Поделиться через


Silveright Breaking Changes between Mix and Version 1.0

I’m using the post to aggregate my other post into a comprehensive list of V1.0 breaking changes.

 

1. There are a set of ASX tags we previously silently ignored that we will now result in a MediaFailed event. These are: PREVIEWMODE, BANNERBAR, PARAM, REPEAT, STARTMARKER, ENDMARKER and some MOREINFO tags We will also throw a MediaFailed event if we encounter fallback URLs (e.g. multiple REF elements in an ENTRY tag).

2. The FontURI for a Glyph element will be resolved asynchronously rather than synchronously. The means that text displayed via the Glyphs element will appear once the font is downloaded – in most cases after other content has already appeared.

3. We report a greater number of parser errors. Developers will mostly likely see this in cases where they are setting a numeric value to an invalid value. In Mix bits, we’ll treat the invalid value as “0” where we throw an error in V 1.0. Note that internally, we’ve seen a number of samples with this issue. One way we’ve seen this is with the following:

 

<TextBlock Width="Auto" Text="Created By:" />

 

“Auto” is not supported in Silverlight and in Mix bits caused the Width to be set to 0. Given we don’t clip TextBlock by Width, this didn’t impact the application but will generate a V 1.0 error.

 

4. We’ve changed OnLoad, OnError, OnResize, OnFullScreenChange to be function pointer based rather than being string based. In order to developer Silverlight content that works on both Mix and V 1.0 bits, you’ll need to do the “if check” I described in a previous post.

 

      // Hook resize

      if (Sys.Silverlight.checkVersion(_ag, "20416")) {

        // Mix code path – use strings

        _ag.content.onResize = "javascript:onResize";

        _ag.content.onFullScreenChange = "onFullScreenChanged";

      } else {

  // RTM code path – use function pointers

        _ag.content.onResize = onResize;

        _ag.content.onFullScreenChange = onFullScreenChanged;

      }

 

5. The MediaElement Position property value can be greater than the MediaElement NaturalDuration property value. This will mostly be seen in broadcast cases where previously we returned 0 for the “Position” value but now we return the play time.

6. Elements in <*.Resource> blocks must be named (which will almost always be the case in Mix bits). What this means is you must have an x:Name property for all content in a <*.Resources> section.

 

      <!-- OK with Mix bits -->

      <Canvas.Resources>

        <Storyboard>

      <!-- Content here... -->

        </Storyboard>

   </Canvas.Resources>

      <!-- Must add x:Name -->

      <Canvas.Resources>

        <Storyboard x:Name="name">

      <!-- Content here... -->

        </Storyboard>

   </Canvas.Resources>

7. You can no longer use “\” in URIs. At Mix, this did not work correctly across platforms and caused some confusion so we’ve made this break consistently across all platforms. All web resources paths that use a “\” should replace them with “/”. For example, use "/assets/images/bg.jpg" instead of "\assets\images\bg.jpg".

8. The PathFigure IsFilled property is no longer supported. Note that IsFilled was silently ignored in the Mix release and we now produce an error if this is used.

9. AddEventListener now returns a token that needs to be passed to removeEventListener to un-register event handlers. If you are using removeEventListener (which didn’t work consistently in the Mix bits), you’ll need to modify the JavaScript calls to addEventListener and removeEventListner as shown below:

 

    // Silverlight Beta (Mix)

    obj.addEventListener("MouseEnter", handler);

    obj.removeEventListener("MouseEnter", handler);

    // Silverlight Version 1.0

    var eventId = obj.addEventListener("MouseEnter", handler);

    obj.removeEventListener("MouseEnter", eventId);

    // Or if using XAML to add the event handler

    // Silverlight Beta (Mix)

     <Canvas x:Name="obj" MouseEnter="javascript:handler">

    sender.findName("obj").removeEventListener("MouseEnter", handler);

    // Silverlight Version 1.0

     <Canvas x:Name="obj" MouseEnter="handler">

    sender.findName("obj").removeEventListener("MouseEnter", 0);

 

10. The downloader component no longer supports synchronous downloads and therefore the synchronous argument to the “open” method. See this post for details.

11. The syntax “javascript:” is no longer supported when specifying event handlers. See this post for details.

12. The Silverlight plug-in has been renamed from “WPFe Plug-In” to “Silverlight Plug-In”. This breaks browser detection used in the Mix version of “silverlight.js”. This version of “silverlight.js” supports both the Mix and RTM plug-in names.

13. Animations declared in markup must include a TargetName and a TargetProperty.

14. The “Visibility” property no longer accepts “Hidden” (use “Collapsed” instead). See this post for details.

Comments

  • Anonymous
    June 06, 2007
    PingBack from http://blogs.msdn.com/jstegman/archive/2007/06/06/more-v-1-0-changes.aspx

  • Anonymous
    June 06, 2007
    The comment has been removed

  • Anonymous
    June 10, 2007
    I've created a single post that aggregates my other posts on V 1.0 breaking changes. In the future, I'll

  • Anonymous
    June 11, 2007
    The comment has been removed

  • Anonymous
    June 14, 2007
    Joe has a comprehensive list of breaking changes between the 1.0 Beta and the forthcoming 1.0 RTW release

  • Anonymous
    June 15, 2007
    Updated info about the changes to the 1.0 release Silveright Breaking Changes between Mix and Version

  • Anonymous
    June 18, 2007
    Appunti di WPF: Un po' di link alla rinfusa #2

  • Anonymous
    June 25, 2007
    Joe Stegman has a detailed blog post on the breaking changes between Silverlight beta and version 1.0

  • Anonymous
    July 01, 2007
    For those of you planning to release applications on the Silverlight 1.0 platform, Joe Stegman has a

  • Anonymous
    July 08, 2007
    Inom kort släpps en så kallad 'Release Candidate' av Silverlight 1.0. Den innnehåller ett antal större

  • Anonymous
    July 13, 2007
    In just a couple of weeks, we'll be ready to publish the Release Candidate of Silverlight 1.0 to the

  • Anonymous
    July 13, 2007
    In just a couple of weeks, we&#39;ll be ready to publish the Release Candidate of Silverlight 1.0 to

  • Anonymous
    July 14, 2007
    silverlight: prepare for the release candidate

  • Anonymous
    July 15, 2007
    Joe, can we expect a 1.1 update as well? If yes, will a go-live license for 1.1 accompany it? Thanks

  • Anonymous
    July 15, 2007
    微软公司在几周内就会发表Silverlight 1.0 RC版。其实Joe Stegman早已在其博客指出Silverlight 1.0 Beta与Silverlight 1.0 RC版的一些重大差异。一旦RC版发表,相关功能将大致底定,最终版本只会再做一些细微的修正。然而,Beta与RC版之间确实存在一些具体差异,如果您已经开始学习或是撰写Silverlight 1.0应用程序,现在是时候开始准备因应相关的改变。

  • Anonymous
    July 15, 2007
    Avec l'approche de la disponibilité de la prochaine version intermédiaire de Silverlight 1.0, la Release

  • Anonymous
    July 15, 2007
    Avec l&#39;approche de la disponibilité de la prochaine version intermédiaire de Silverlight 1.0, la

  • Anonymous
    July 15, 2007
    Prepare your self to the Silverlight 1.0 RC1 edition which can be downloaded from here " Silverlight

  • Anonymous
    July 16, 2007
    בשבועות הקרובים תשוחרר גרסת RC ל- Silverlight 1.0. על ההבדלים והשינויים שהולכים וקרבים ניתן ללמוד מ הפוסט

  • Anonymous
    July 16, 2007
    עדלאי ריכז את כל מה שצריך לדעת על השחרור הצפוי( חלק 1 וחלק 2 ). RC - Release Candidate הוא השלב המקדים

  • Anonymous
    July 16, 2007
    The comment has been removed

  • Anonymous
    July 17, 2007
    Preparing for Silverlight 1.0 RC and Beyond Silveright Breaking Changes between Mix and Version 1.0...

  • Anonymous
    July 17, 2007
    根据Silverlight成员的blog所述,Silverlight1.0Release Candidate(正式候选)将在数周内发布,现在他们正在进行最后的准备工作,Silverlight团队...

  • Anonymous
    July 24, 2007
    Joe, You say that "We will also throw a MediaFailed event if we encounter fallback URLs (e.g. multiple REF elements in an ENTRY tag)." I've just been working with an ASX with multiple REF on the RC and it does not throw a MediaFailed for multiple REF. It just ignores all but the first REF. So does not fallback.

  • Anonymous
    July 27, 2007
    This blog post is shamelessly based on an excellent post by Tim Sneath. But the information is so important

  • Anonymous
    July 27, 2007
    Silverlight 1.0 RC and 1.1 alpha 发布了

  • Anonymous
    July 29, 2007
    It looks like Microsoft has been busy lately as not only do we have a new beta of Visual Studio 2008

  • Anonymous
    July 29, 2007
    As you may have already noticed: the RC1 of Silverlight 1.0 has been put online on the weekend. Since

  • Anonymous
    July 30, 2007
    Si, asi es, por lo visto es epoca de liberaciones, porque ademas del Beta 2 de visual studio, desde el

  • Anonymous
    July 30, 2007
    Body: Si, asi es, por lo visto es epoca de liberaciones, porque ademas del Beta 2 de visual studio, desde

  • Anonymous
    July 30, 2007
    [由 silverlgiht.cn 翻译,转载请注明!] Beta 和 RC两个版本之间的差别 本篇文档提供一个清单,包含自从 Silverlight 1.0 Beta 发布 (MIX release

  • Anonymous
    July 31, 2007
    Si, asi es, por lo visto es epoca de liberaciones, porque ademas del Beta 2 de visual studio,...

  • Anonymous
    August 03, 2007
    If you've been working on Silverlight projects using the Silverlight 1.0 Beta, it's time to gear up for

  • Anonymous
    August 09, 2007
    You may have heard there was a July&#39;07 refresh of silverlight to the original Mix&#39;07 release

  • Anonymous
    August 14, 2007
    These documents provide a list of new features, changes or enhancements that have been made to Silverlight

  • Anonymous
    August 14, 2007
    Silverlight Changes from Beta to RC

  • Anonymous
    August 14, 2007
    These documents provide a list of new features, changes or enhancements that have been made to Silverlight

  • Anonymous
    August 17, 2007
    I converted a few Silverlight beta applications to Silverlight RC, and had to fix quite a few breaking

  • Anonymous
    August 17, 2007
    I converted a few Silverlight beta applications to Silverlight RC, and had to fix quite a few breaking

  • Anonymous
    February 01, 2008
    בשבועות הקרובים תשוחרר גרסת RC ל- Silverlight 1.0. על ההבדלים והשינויים שהולכים וקרבים ניתן ללמוד מ הפוסט