简体   繁体   中英

Which to use - WPF or Silverlight?

I want to create a desktop like app, but I'm kind of confused as to which technology to use. It seems Silverlight functions like a desktop app. Which technology is better suited and has is more future proof?

WPF is the framework to go with if you are building a desktop application. Silverlight is more of a web application framework. It all depends on where and how the application is being used.

This Question compares the two .

Desktop apps should be built with WPF. Silverlight has a lot of security restrictions which doesn't make life easier.

Which technology is better suited and has is more future proof?

This depends a LOT on the purpose and goals of your desktop application.

If your application needs to interop with the system in a "non-standard" way, or provide other types of 3rd party interop, WPF will be a superior solution (at least until SL 5's P/Invoke support).

However, if your application is a LOB application, Silverlight (running OOB) has many advantages - especially if you want to take advantage of things like RIA Services (which hasn't been ported to WPF).

WPF has at its disposal the entire .NET framework while Silverlight in an attempt to be lightweight has a part of the framework (plus some really cool things). So, it really depends on the scope and deployment methods. To me it makes more sense to make a Silverlight application a desktop application than to make a WPF application deploy through the web. But again, let the scope dictate. If you're wondering which to learn, the answer is simple - either one as they are similar enough that when you're good at one you'll be okay in the other.

If you're used to WPF, you'll find that Silverlight lacks a bunch of major and minor features like data triggers, FindAncestor, synchronous WebClient requests, and so on. Probably not deal breakers but definitely annoyances.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM