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=objMouseEnter=javascript:handler>


    sender.findName(“obj”).removeEventListener(“MouseEnter”, handler);


 


    // Silverlight Version 1.0


     <Canvas x:Name=objMouseEnter=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 (40)

  1. WynApse says:

    Silverlight Cream for June 6, 2007 — more v1.0 breaking changes

  2. I’ve created a single post that aggregates my other posts on V 1.0 breaking changes. In the future, I’ll

  3. WynApse says:

    Silverlight Cream for June 11, 2007

  4. Blogs says:

    Joe has a comprehensive list of breaking changes between the 1.0 Beta and the forthcoming 1.0 RTW release

  5. Updated info about the changes to the 1.0 release Silveright Breaking Changes between Mix and Version

  6. Appunti di WPF: Un po’ di link alla rinfusa #2

  7. Bob's Blog says:

    Joe Stegman has a detailed blog post on the breaking changes between Silverlight beta and version 1.0

  8. Chris Koenig says:

    For those of you planning to release applications on the Silverlight 1.0 platform, Joe Stegman has a

  9. Inom kort släpps en så kallad ‘Release Candidate’ av Silverlight 1.0. Den innnehåller ett antal större

  10. Tim Sneath says:

    In just a couple of weeks, we’ll be ready to publish the Release Candidate of Silverlight 1.0 to the

  11. In just a couple of weeks, we&#39;ll be ready to publish the Release Candidate of Silverlight 1.0 to

  12. silverlight: prepare for the release candidate

  13. mikeb123 says:

    Joe, can we expect a 1.1 update as well? If yes, will a go-live license for 1.1 accompany it?

    Thanks

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

  15. Avec l’approche de la disponibilité de la prochaine version intermédiaire de Silverlight 1.0, la Release

  16. Avec l&#39;approche de la disponibilité de la prochaine version intermédiaire de Silverlight 1.0, la

  17. Prepare your self to the Silverlight 1.0 RC1 edition which can be downloaded from here " Silverlight

  18. בשבועות הקרובים תשוחרר גרסת RC ל- Silverlight 1.0. על ההבדלים והשינויים שהולכים וקרבים ניתן ללמוד מ הפוסט

  19. עדלאי ריכז את כל מה שצריך לדעת על השחרור הצפוי( חלק 1 וחלק 2 ). RC – Release Candidate הוא השלב המקדים

  20. loicbar says:

    Hi,

    I just translate this article in French on my blog :

    http://www.loicbar.com/post/Traduction–Silverlight-RC-10-le-changelog.aspx

    Fr : Je viens juste de traduire cet article en français sur mon blog.

  21. Preparing for Silverlight 1.0 RC and Beyond Silveright Breaking Changes between Mix and Version 1.0…

  22. Bryan Chow says:

    根据Silverlight成员的blog所述,Silverlight1.0Release

    Candidate(正式候选)将在数周内发布,现在他们正在进行最后的准备工作,Silverlight团队…

  23. doctorT says:

    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.

  24. This blog post is shamelessly based on an excellent post by Tim Sneath. But the information is so important

  25. neuhawk says:

    Silverlight 1.0 RC and 1.1 alpha 发布了

  26. It looks like Microsoft has been busy lately as not only do we have a new beta of Visual Studio 2008

  27. As you may have already noticed: the RC1 of Silverlight 1.0 has been put online on the weekend. Since

  28. Si, asi es, por lo visto es epoca de liberaciones, porque ademas del Beta 2 de visual studio, desde el

  29. Body: Si, asi es, por lo visto es epoca de liberaciones, porque ademas del Beta 2 de visual studio, desde

  30. jshao says:

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

  31. Si, asi es, por lo visto es epoca de liberaciones, porque ademas del Beta 2 de visual studio,…

  32. If you’ve been working on Silverlight projects using the Silverlight 1.0 Beta, it’s time to gear up for

  33. You may have heard there was a July&#39;07 refresh of silverlight to the original Mix&#39;07 release

  34. These documents provide a list of new features, changes or enhancements that have been made to Silverlight

  35. Joe On .NET says:

    Silverlight Changes from Beta to RC

  36. These documents provide a list of new features, changes or enhancements that have been made to Silverlight

  37. I converted a few Silverlight beta applications to Silverlight RC, and had to fix quite a few breaking

  38. I converted a few Silverlight beta applications to Silverlight RC, and had to fix quite a few breaking

  39. בשבועות הקרובים תשוחרר גרסת RC ל- Silverlight 1.0. על ההבדלים והשינויים שהולכים וקרבים ניתן ללמוד מ הפוסט

Skip to main content