Welcome to MSDN Blogs Sign in | Join | Help

A new Silverlight version has been released! [Samples updated for the 1.1 Refresh]

With today's release of the Silverlight 1.0 RC and 1.1 Refresh, I've updated the Silverlight samples I own to run on the new bits. Specifically, I've uploaded the migrated source code and recompiled binaries for the team's Silverlight Airlines Demo, my Simple XPS Viewer Demo, and my Silverlight Surface Demo. Because the Silverlight 1.1 Refresh replaces the earlier 1.1 Alpha, the existing source and demo URLs remain the same and simply point to the new content.

The 1.1 Refresh's breaking changes from the 1.1 Alpha build we've all been using before today are documented in the SDK. The migration of the these samples was pretty simple and required very little code change. For the benefit of others migrating Silverlight apps, here are the specific incompatibilities I encountered along with the fix for each:

  • Silverlight.js content updated and namespace changed from Sys.Silverlight to Silverlight - use new version of Silverlight.js, change CreateSilverlight.js to use the new namespace, and specify version "1.1" in the call to createObject(Ex)
  • Downloader.Open API changed to remove third parameter ("async") because all downloads are now asynchronous - change call sites to pass only two parameters since they were already passing true for async
  • Assignment of DoubleAnimation to new Storyboard's Children property now throws an exception - use a Control class and InitializeFromXaml to load the Storyboard and Animation from a XAML resource
  • Visibility enum no longer contains .Hidden value - use .Collapsed instead
  • OnResize is now function pointer-based instead of string-based - pass function pointer instead

Additionally, a security-related change to the Downloader object now blocks access to file:// URLs. This means that the XPS Viewer and Surface demos will only be able to access their resources (images, files, etc.) when the host page is loaded from a web server. Specifically, loading Default.html from Explorer or by hitting F5 to run the project in Visual Studio will now result in an error message like the following:

Silverlight error message
ErrorCode: 1001
ErrorType: DownloadError
Message: AG_E_UNKNOWN_ERROR

To re-enable debugging for the XPS Viewer and Surface demos, I recommend the following steps which add a web site project to Visual Studio and access the demo page via the included Visual Studio Development Web Server (which uses http:// URLs and works fine). While there are other ways to work around the file:// restriction, I'm suggesting this approach because it automatically references the project files, doesn't require creating additional directories or copies of project files, and doesn't require getting involved with IIS. To enable debugging:

  1. From the File menu in Visual Studio 2008, click Open, Project/Solution...
  2. Select the .csproj file for the demo you want
  3. Click OK
  4. From the View menu, click Solution Explorer
  5. Right-click the Solution node at the top
  6. Click Add, Existing Web Site...
  7. Select the same directory the .csproj file is in
  8. Click OK
  9. Click No when asked to upgrade the web site
  10. Right-click the new Web Site Project node
  11. Click Property Pages
  12. Click Start Options in the left column
  13. Check Silverlight in the Debuggers section at the bottom right
  14. Click OK
  15. Right-click the new Web Site Project node
  16. Click Set as StartUp Project
  17. Press F5 to Run
  18. Click OK to enable debugging in web.config

Okay, enough with the boring details - go get the Silverlight 1.1 Refresh and have some fun with it! :)

Published Friday, July 27, 2007 4:13 PM by Delay
Filed under:

Comments

# איך לעשות Upgrade ל Silverlight 1.1 בגרסה החדשה

Saturday, July 28, 2007 7:50 PM by It's All About Causality

Delay מפרט את השלבים שהוא עשה כדי לעשות Upgrade לכמה דברים שהוא כתב ב Silverlight 1.1. בינהם ה Air Lines

# Silverlight 1.0 RC - Downloader の仕様変更

Tuesday, July 31, 2007 9:38 AM by develop .net

先のエントリで Silverlight 1.0 RC の Downloader の仕様変更について触れましたが、非同期ダウンロードのみになっただけでなく、file:// によるローカルファイルの参照ができなくなっています(もちろん、リソースとしてアクセスすることはできます)。これはクロスサイトスクリプティングの問題を避けるためです。

# Streaming with Silverlight

Tuesday, July 31, 2007 5:40 PM by Technoeuphoria!

I was kept awake till now (3:45am) because of this little issue that I had with Silverlight streaming

# My Silverlight SlideShow Application Version 2

Sunday, August 19, 2007 12:10 AM by AlanO's Blog

My Silverlight SlideShow Application Version 2

# re: A new Silverlight version has been released! [Samples updated for the 1.1 Refresh]

Monday, August 20, 2007 8:18 AM by N.Tony

Hi Delay! I have some question:

It was noticed that MediaElement displayed mms stream only if the server broadcasted a concrete file (for example "C:\wmpub\WMRoot\industrial.wmv").

If I set source of Publishing point as playlist (for example "C:\wmpub\WMRoot\serverside_playlist.wsx") or I broadcast my web camera to this publishing point through Windows Media Encoder then video doesn't display and there are no errors.

But video played properly in the previous version of Silverlight Runtime.

# re: A new Silverlight version has been released! [Samples updated for the 1.1 Refresh]

Tuesday, August 21, 2007 1:02 PM by Delay

N.Tony,

In response to your question I asked around internally and pointed a few people to your Silverlight Forums post on this topic (http://silverlight.net/forums/p/2914/10435.aspx). It looks like they've already responded and you've got an answer now. Hope that helps! :)

# re: A new Silverlight version has been released! [Samples updated for the 1.1 Refresh]

Wednesday, August 22, 2007 3:46 AM by N.Tony

Yes, it's solved my problem. Thanks for your time!

# Streaming with Silverlight

Saturday, September 01, 2007 1:37 AM by Jocelyn World

I was kept awake till now (3:45am) because of this little issue that I had with Silverlight streaming

# Instruction to enable Debugging Fail

Sunday, September 09, 2007 3:30 PM by dbaechtel

I tried your instructions above to enable debuugging and when I build my SilverLight project in VSTS 2008 Orcas B2, I get:

Error 1 Failed to start monitoring changes to 'H:\HW\HelloWorld'.

'H:\HW\HelloWorld' is my web site. What does this error mean? How do I fix it and debug my app?

# re: A new Silverlight version has been released! [Samples updated for the 1.1 Refresh]

Monday, September 10, 2007 4:16 PM by Delay

dbaechtel,

Please have a look at the following KB article which sounds like it discusses the issue you're seeing: http://support.microsoft.com/kb/317955.

# Proof-of-concept Silverlight XPS reader gets some Beta 1 love [SimpleSilverlightXpsViewer updated for Silverlight 2 Beta 1!]

Tuesday, April 08, 2008 6:06 PM by Delay's Blog

After a few customer requests to update my SimpleSilverlightXpsViewer proof-of-concept XPS reader for

# Streaming with Silverlight

Wednesday, December 17, 2008 5:34 AM by Jocelyn

I was kept awake till now (3:45am) because of this little issue that I had with Silverlight streaming

# Streaming with Silverlight

Tuesday, January 06, 2009 6:56 AM by jocelyn

I was kept awake till now (3:45am) because of this little issue that I had with Silverlight streaming

Anonymous comments are disabled
 
Page view tracker