Over a million developers have joined DZone.

The Silverlight 4 Release Candidate

DZone's Guide to

The Silverlight 4 Release Candidate

· ·
Free Resource

Today Scott Guthrie et al. announced many awesome new things during the keynote at Microsoft's MIX10 conference. One of it was the Silverlight 4 Release Candidate which replaces the beta version and is now available for download. Beside all the great new features that were added, it's now finally possible to use the Visual Studio 2010 RC for Silverlight 4 development. Kudos to the Silverlight team for catching up with Visual Studio 2010 and all the cool new features they implemented.

Oh, and the final Silverlight 4 version will be available next month (April 2010)!

This blog post contains a summary of all the new features that were added since the Silverlight 4 Beta to the Silverlight 4 RC and the breaking changes that naturally come along with betas. Plus some details about the CaptureSource's new capture usage pattern.

New Silverlight 4 RC features

Rich Text
  • RichTextBox rename
  • Text position and selection APIs
  • XAML property for serializing text content
  • XAML clipboard format
  • FlowDirection support on Runs
  • "Format then type" support
  • Thai / Vietnamese / Indic support
  • UI Automation Text pattern
  • UploadProgress support (Client stack)
  • Caching support (Client stack)
  • Sockets security restrictions removal (Full Trust)
  • Sockets policy file retrieval via HTTP
  • Accept-Language header
Out of Browser (Full Trust)
  • XAP signing
  • Silent install and emulation mode
  • Custom window chrome
  • Better support for COM Automation
  • Cancelable shutdown event
  • Updated security dialogs
  • Pinned full-screen mode on secondary display
  • Webcam / Mic configuration preview
  • More descriptive MediaSourceStream errors
  • Content & Output protection updates
  • Updates to H.264 content protection (ClearNAL)
  • Digital Constraint Token
  • CGMS-A
  • Multicast
  • Graphics card driver validation & revocation
Graphics and Printing
  • Hardware accelerated perspective transformations
  • Ability to query page size and printable area
  • Memory usage and performance improvements
  • Entity-level validation support of INotifyDataErrorInfo for DataGrid
  • XPath support for XML
  • New architecture enables future innovation
  • Performance and stability improvements
  • XmlnsPrefix & XmlnsDefinition attributes
  • Support setting order-dependent properties
Globalization & Localization
  • Support for 31 new languages
  • Arabic, Hebrew and Thai input on Mac
  • Indic support
  • Update to DeepZoom code base with hardware acceleration
  • Support for Private mode browsing
  • Google Chrome support (Windows)
  • FrameworkElement.Unloaded event
  • HTML Hosting accessibility
  • IsoStore performance improvements
  • Native hosting performance improvements (e.g. Bing Toolbar)
  • Consistency with Silverlight for Mobile APIs and Tooling
  • System.Numerics.dll
  • Dynamic XAP support (MEF)
  • Frame / Navigation refresh support
The new webcam and microphone configuration preview is pretty neat. The user can now select the default webcam & microphone device really comfortable and we only need to use CaptureDeviceConfiguration.GetDefaultVideoCaptureDevice() or CaptureDeviceConfiguration.GetDefaultAudioCaptureDevice() to get the selected default video and audio device.

The webcam permission dialog is now consent and can remember if the user has previously allowed that certain application. Tim Heuer's blog post has more details about his handy new feature.

Breaking Changes since the Silverlight 4 beta
The first and most important take away: As usual all Silverlight 4 beta applications have to be updated to the RC and recompiled, otherwise the new RC runtime won't execute them.
  • Renamed RichTextArea to RichTextBox
  • Changes to DRM API
  • TextSelection.SetPropertyValue is now named .ApplyPropertyValue
  • INotifyDataErrorInfo moved to core (System.Windows.dll)
  • WebBrowser.ScriptNotify signature change
  • NotificationWindow.Visible and NotificationWindow.Closed were changed
  • Webcam and output protection change
  • COM Interop API changes (name and namespace)
  • RichTextBox.TextWrapping default value changed
  • Binding declarations in XAML where the target is a DependencyObject
  • HtmlBrush renamed to WebBrowserBrush

The official breaking changes document contains all the details and Koen Zwikstra (@kozw) has made some useful diff lists.

Changed usage pattern for AsyncCaptureImage
The biggest difference in the webcam API besides the renaming of some enums, properties and other members is the change of the AsyncCaptureImage method which was renamed to CaptureImageAsync. Additionally the usage pattern of the CaptureImageAsync method was updated to the standard .Net / Silverlight asynchronous event pattern.

Before the Silverlight 4 RC, AsyncCaptureImage was used like this:

// Initialization
captureSource = new CaptureSource();

// Capture image
captureSource.AsyncCaptureImage(bitmap =>
// Process camera snapshot

The new RC CaptureImageAsync usage pattern:

// Initialization
captureSource = new CaptureSource();
// Wiring the CaptureImageCompleted event handler
captureSource.CaptureImageCompleted += (s, e) =>
// Process camera snapshot (e.Result is a WriteableBitmap)

// CaptureImageAsync fires the CaptureImageCompleted event

Although the pre-RC pattern was smaller and easier, it's overall more consistent now and I welcome the changes.

I will update some of my Silverlight 4 beta samples and the SLARToolkit during the next days. Furthermore I will make a Silverlight 4 RC build of the Matrix3DEx sample that should take advantage of the new hardware accelerated perspective transformations.



Published at DZone with permission of

Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}