Detailed explanation Silverlight and WPF extend to each other

Source: Internet
Author: User
Tags extend file system silverlight linux

1. More suited to WPF or Silverlight scenarios

WPF is designed to create Windows desktop applications with access to rich user interface features such as animations, 3D graphics, audio and video, and direct access to graphics acceleration hardware for better graphics performance. Because most WPF applications run locally on the computer, and so do not involve security restrictions like Web applications, WPF applications can store only a small amount of data on a user's computer, as well as an application that does not have to download from a remote computer, if the file system has access restrictions. This is ideal for Microsoft. Net®framework, and you can do without including all the complete features that were created.

Silverlight is designed to be a broader extension than WPF because it supports multi-platform and, as of now, it supports not only Windows but also Mac,novel and Linux (moonlight– is currently equivalent to Silverlight 1.0, The version equivalent to Silverlight 2.0 is currently under development.

However, in order to achieve this great goal, Silverlight must be able to operate in a variety of browsers and different operating system environments, which requires some structural constraints on Silverlight, because the hardware-driven approach may be different across systems, such as direct x® and Windows display-driven models under Windows, they are not on Mac and Linux.

Next is the Silverlight in the browser's plug-in size, Microsoft was asked to omit the. NET framework of many features, or plug-ins too large, which many features are not commonly used, for the user is not very useful, this will affect the user's download enthusiasm, precisely because of this limitation, Silverlight will not be as rich as WPF in the short term.

When choosing which technology is more appropriate for your project, if you consider graphics acceleration, or features that are only available in WPF, or have high performance requirements, it is most appropriate to choose WPF, and conversely, if you're not too high on performance and want to extend your application to the Mac and Linux platform, you only have to choose Silverlight was gone.

2. A scenario suitable for both WPF and Silverlight

The Windows client application that was first developed under WPF may be extended to run on a Mac or Linux platform, for example, when WPF was introduced, I created a XBAP application (a XAML browser application) that included photographs taken during my 2006 trip to Senegal, Unfortunately, because our friends do not have the. NET Framework installed, they cannot see these photos on their computers, and by converting this program to Silverlight, my friends or those who do not want to install the. NET Framework can easily see the photos.

There's an interesting article on Mike Tucker's blog site that was originally created by Silverlight and then converted to a WPF application, Tucker looking for a way to tune its Silverlight program performance, Instead of finding such a tool, he decided to create an equivalent WPF program.

Caliburn is an application framework designed to help developers implement different models, such as MVC,MVP, Presentation Model (MVVM), and command and application controllers are examples of programs that use both Silverlight and WPF development. Similarly, developers want to use both technologies to create their own custom controllers.

3.WPF and Silverlight feature comparisons

Because Silverlight is a large subset of WPF, some of the properties of Silverlight are not, and their common technical features are different in their implementation, Vertigo Software's Christopher Vigna allows us to use the A sketch of the surface to illustrate this point.

Figure-1 WPF and Silverlight contrast charts (February 2009)

attribute sets, which include dependency properties, styles, and visual trees, are common features, but are not implemented the same way

There is no shortage of blog posts and forum discussion topics to compare the two technologies on the Web. But since both technologies are at a constant stage of development, it is very unreliable to collect and collate the differences from blog posts because the blog posts you see may be outdated, if you have to say The MSDN Online Help file may be the most authoritative, but it also has a date that expires, but it is useful in examining the current differences between WPF and Silverlight, not only explaining how to handle them while programming, but also describing the possible merging of the two in the future.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.