Silverlight 2 Released!


Url: http://silverlight.net

Silverlight Logo

Its been a long road to release but we're finally there. If you're anything like me and have been through WPF/E, Silverlight 1.0, Silverlight 1.1, Silverlight 2 Beta 1, Beta 2 and RC0, I know you're ready for this thing to hit the streets.

I would like to congratulate the team on a solid set of functionality and tooling. For a fairly new product, this technology has progressed much faster than I expected it to. When asked some months ago, I didn't think Silverlight would be in this great a shape until Silverlight 3.  The control model, data binding, data access, tool support, visual state manager, etc. Its all a much bigger leap from Silverlight 1.0 that I could have possibly envisioned.

There are a number of changes since Beta 2 (though this list is the same as the RC) that I want to make sure you know about:

  • Visual Studio 2008 now requires SP1 to be applied before the Silverlight 2 tools will work so make sure you have updated to the Service Pack 1 before you try to install the tool package.
  • Blend 2.5 is now a Service Pack for Blend 2.  You'll need Blend 2 then you can apply Service Pack 1.
  • Rendering is now pixel-aligned by default. In earlier versions you could do sub-pixel rendering which could result in odd or aliased designs.  In the release, all rendering is pixel-aligned unless you override it with FrameworkElement.UseLayoutRounding which is true by default.  Setting it to default will do sub-pixel rendering.
  • For hosting Silverlight with an <OBJECT /> Tag, you must change your type from "application/x-silverlight-2-b2" to "application/x-silverlight-2".
  • For embedded fonts, font URI's must be resource based (instead of XAP based). That means that relative URI's for font's must point to a font-file as a resource inside an assembly instead of as a file inside the .xap file.  If you are using Blend 2 to embed your fonts, this will happen by default.  If you are refactoring old code, changing the font's "Build Action" from "Content" to "Resource" should do the trick.
  • If you are using the VisualStateManager, you will need to change VisualTransition.Duration to VisualTransition.GeneratedDuration.  This usually means changing the "Duration" attribute in your ControlTemplates to "GeneratedDuration". 
  • If you are using the KeyDown event, you'll be happy to find out that the event is now delivered asynchronously.  In Beta 2 and before you could get into re-entrancy issues.  You may need to tweak your use of this event to deal with this new model.
  • OpenFileDialog no longer uses the FileDialogFileInfo class but instead changes the API to simply the use of the selected files.  If you use the dialog, you'll need to adjust the use.
  • Most controls now have a new default control template that should be less Window'y.  If you have made some minor changes to those templates for your own, you will find that they don't match any longer. Because of this you might want to re-skin them in Blend.
  • Finally, the biggest painful change for you is to make sure that your styles and control templates are in the right order. In previous revisions, the rules were lax around StaticResources having to be defined before they are used. This caused a lot of problems for tooling and inconsistent runtime behavior.  To address this you *must* have a related resource defined before its used.  This may mean re-ordering your control templates.

I hope this opens up the more conservative uses of Silverlight 2 and allows Silverlight to move from an 'early-adopter' technology to a mainstream way to build Internet-based applications.

Also announced was the fact that you can use Eclipse now to write Silverlight 2 applications.  Cool!  http://www.eclipse4sl.org/  It'll be licensed under the EPL 1.0 License.

Also announced was the new Controls from Shawn Burk's team to be released on CodePlex!  These controls include:

  • DockPanel
  • WrapPanel
  • ViewBox
  • Label
  • HeaderedContentControl
  • Expander
  •  TreeView
  • NumericUpDown
  • AutoComplete
  • Accordion

These controls and their test-suite will be covered under MS-PL so they will be ready (including source code) coming pretty soon. 

What do you think?



Shawn
Shawn Wildermuth
Author, Teacher, and Coach




My Courses

Wilder Minds Training
Vue.js by Example (New Lower Price)
Bootstrap 4 by Example (New Lower Price)
Intro to Font Awesome 5 (Free Course)
Pluralsight
Building an API with ASP.NET Core (New Course)
Building a Web App with ASP.NET Core, MVC6, EF Core, Bootstrap and Angular (updated for 2.2)
Less: Getting Started (New)
Using Visual Studio Code for ASP.NET Core Projects
Implementing ASP.NET Web API

Application Name WilderBlog Environment Name Production
Application Ver v4.0.30319 Runtime Framework x86
App Path D:\home\site\wwwroot\ Runtime Version .NET Core 4.6.27514.02
Operating System Microsoft Windows 10.0.14393 Runtime Arch X86