views:

295

answers:

5

A common technical decision nowadays is whether to build a ClickOnce rich client application or a web application.

Here I'm focussing primarily on choosing between a WPF application or a Silverlight application.

The chief benefit of Silverlight is obvious - it can be hosted in a browser.

But, if a programmer used to WPF was to start programing in Silverlight, what would he/she suddenly find is not possible or much harder?

Items can be of the following:

  • You just cannot do it, period
  • You can do it, but only sort of, with lots of caveats
  • You can do it, but there's a lot more hoops to jump through

Examples I've stumbled on so far:

What others?

+9  A: 

Programmatic Differences Between Silverlight and WPF, A Whitepaper by Wintellect, LLC:

http://wpfslguidance.codeplex.com/Release/ProjectReleases.aspx?ReleaseId=28278

69 Pages, covers almost everything.

Chris
+3  A: 

Cross-domain restrictions - Silverlight can only access sites which allow it via crossdomain.xml or clientaccesspolicy.xml.

For example, Silverlight can't communicate directly with Twitter's API or StackOverflow RSS feeds.

Jon Galloway
+2  A: 

I answered a very similar question a few days ago, here:

http://stackoverflow.com/questions/1160770/wpf-vs-xbap-vs-silverlight-which-suits-business-applications/1163911#1163911

Some of the more notable ones are you can't open a new window, there's an inability to put the app in the notification area and no mousewheel support (not sure if there is in WPF). Some things are trickier to program too.

mattmanser
Anything you can do in Javascript, you can call with Silverlight via the HTML Bridge.
TreeUK
+1  A: 

"...and no mousewheel support (not sure if there is in WPF)...".

There is mouse wheel support, but not as easy as in WPF. You have to listen to the MouseWheel event an calculate the scrolling offset by yourself.

Another thing that is different is, that you do not have Ancestor-Binding in Silverlight.

dalind
+1  A: 

See: Silverlight WPF Compatibility (MSDN) and Contrasting Silverlight and WPF (Patterns & Practices)

devMomentum