Comparing Silverlight and WPF

In .NET 3.0, XAML is used as an object graph serialization technology. For WPF this allows XAML to be used as a user interface markup language that is then serialized into CLR objects. But it is important to note that WPF does not require XAML at all. With WPF, you can create user interface objects as CLR code like so:

Canvas myCanvas = new Canvas(); // You can't do this in Silverlight

Silverlight is different in this respect because it requires XAML. There is no way to create Silverlight XAML objects without utilizing XAML. Silverlight is about displaying elements that are described in XAML on a web page. There are other differences between the two technologies detailed in Table -1.

Table 1. Silverlight and WPF differ from each other in a number of important ways

Silverlight

Windows Presentation Foundation

Web-based

Desktop applications, click-once deployment or XBAP applications

Works across different operating systems (Windows and Mac OSX in the first release)

Requires Windows XP SP2, Windows Server 2003 SP1, and Window Vista

Supports multiple web browsers (Internet Explorer and Firefox on Windows, Firefox and Safari on Mac OSX)

Internet Explorer 6+ for XBAP applications

No .NET Runtime requirements

Requires .NET 3.0 Runtime

No Windows Media Player required for media support

Requires Windows Media Player 10 for media support

Uses XAML for design markup, but the library of tags is smaller

Uses XAML for design markup, but supports a large library of tags

Supports JavaScript ...

Get Getting Started with Silverlight now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.