开发者

WPF to Silverlight project conversion

开发者 https://www.devze.com 2022-12-21 14:07 出处:网络
I need to convert an existing WPF project to Silverlight. I know that there is no an automatic way of doing it.

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 w开发者_JAVA技巧hat pitfalls one should be aware of?


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号