views:

44

answers:

1

I need to convert an existing WPF project to Silverlight. I know that there is no an automatic way of doing it.

Could you share your experience and give advise regarding steps for this conversion and what pitfalls one should be aware of?

+1  A: 

Considering that Silverlight is a subset of WPF, there are many potential issues.

First I would ask why you want to do this, since generally they are used for different purposes. That being said, if you are determined to do a port, then you need to do a namespace analysis to validate that all of the namespaces you are using in your WPF app exist within the silverlight runtime. If you are using things not supported in SL, then you are going to be spending quite a bit of time re-writing those portions.

Other issues I know of are that Silverlight 3 runs in a sandbox, so you can't use the disk, hardware on the box, etc. You also are limited with regards to any requests made over the network, as they must be back to the hosting domain, or use a cross-domain policy file.

Silverlight 4 brings more parity to the party, in that it allows you to run as a trusted desktop app, and brings more of the WPF functionality in, but still not equal.

Kind of a hard question to answer without further detail, but this should get you started.

Craig Huber