Top 10 Best Features in Silverlight 5

In this article we will explore the new features and enhancements in Silverlight 5. As of this writing, Silverlight 5 has been released. To execute the code examples illustrated in this article, you should have the following installed in your system:

  • Visual Studio 2010
  • Silverlight 5 SDK
  • Silverlight 5 Tools

What is Silverlight?

Silverlight is a browser plug-in that promotes a collaborative development environment of rich online media content that enables developers and designers alike to integrate multimedia and graphics into web pages within the context of the managed environment. Over the past few years, Silverlight, formerly known as Windows Presentation Foundation Everywhere (WPF/E), has become popular worldwide for developing the next generation of cross-browser, cross-platform Rich Internet Applications (RIAs). As of this writing, Silverlight 5 has been released.

Top 10 Best Features in Silverlight 5

In this section we will explore 10 of the best new features and enhancements in Silverlight 5.

Multiple Click Count

This is a feature that enables you to count the number of clicks that have occurred on the left and right mouse button. Here is an example:

private void OnMouseDownClickCount(object sender, MouseButtonEventArgs e)
    {
        // Checks the number of clicks.
        if (e.ClickCount == 1)
        {
            // Single click
        }
        if (e.ClickCount == 2)
        {
            // Double Click
        }
        if (e.ClickCount >= 3)
        {
            // Triple Click
        }
    }

Debugging XAML Code

This is a great new feature that enables you to break into and debug your XAML code.

Rich 3D API

Silverlight 5 provides a rich 3 D API that enables you to design and develop applications with initiative user interfaces. The in-built XNA #D graphics API facilitates development of rich, GPU accelerated graphical interfaces. The Silverlight Toolkit includes support for client and server side content project and XNA content processing pipeline support. Silverlight includes XNA Effect support. Note that 3D support in Silverlight is available both in-browser and out-of-browser.

Low-Latency Sound Effects in Silverlight 5

To create low latency sound effects in Silverlight earlier, we have had to create a circular queue of Media Elements that could hold those sound effects and then we also had to write code for buffering. With Silverlight 5, you no longer need to go for such hastles – you can leverage the Xna SoundEffect and SoundEffectInstance classes that provide support for very low latency playback. These classes also can understand wav files.

Performance Improvements in Silverlight 5

The notable performance improvements in Silverlight 5 include improved XAML parse times, improved network latency in ClientHttpWebRequest scenarios, improved hardware accelerated graphics, and reduced start-up time of Silverlight applications using Multicore JIT and 64-bit browser support.

Improved Support for RIA Services

WCF RIA Services were introduced in .NET Framework 4 and Silverlight 4 to allow developers to build applications without the need for service plumbing to push or pull data from the client side. Silverlight 5 provides better support for consuming RIA Services. It provides enhanced MVVM support and better support for customization of generated code.

Improved Support Text and Printing

Silverlight 5 provides excellent support for cleaner text rendering and vector based printing.

Out-of-Browser Improvements

Silverlight 5 provides better support for Out-Of-Browser and LOB applications. Now, trusted out of browser applications in Silverlight can create native operating system windows.

Improved and Flexible Data Binding

Silverlight 5 now provides improved support for data binding through Implicit DataTemplates. This implies that you can specify a DataTemplate for a particular type of binding.

Trick Play Video

The new TrickPlay feature in Silverlight 5 enables you to speed up or slow down the speed at which you are viewing a video without the chipmunk voices. This is a great feature indeed!

Suggested Readings

http://www.microsoft.com/silverlight/

http://www.silverlight.net/learn/overview/what’s-new-in-silverlight-5

http://timheuer.com/blog/archive/2011/04/13/whats-new-in-silverlight-5-a-guide.aspx

http://johnpapa.net/silverlight5features

http://franksworld.com/blog/archive/2010/12/03/12211.aspx

Summary

In this article we explored the top 10 features in Silverlight 5. In future articles on Silverlight we will explore some of these features in greater detail. Happy reading!

More by Author

Get the Free Newsletter!

Subscribe to Developer Insider for top news, trends & analysis

Must Read