将 WPF 应用程序转换为 SilverLight [英] Convert WPF Application to SilverLight

查看:27
本文介绍了将 WPF 应用程序转换为 SilverLight的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以自动/轻松地将现有的 WPF 应用程序转换为 SilverLight?

Is it possible to convert an existing WPF Application to SilverLight automatically/with minimal effort?

推荐答案

并非如此.我找到了一些关于多目标选项的文章="http://blogs.msdn.com/dphill/archive/2008/08/31/hello-prism-2-0.aspx" rel="noreferrer">WPF 和 Silverlight.此时,如果您没有使用 PRISM,那么同时针对它们是一个很大的挑战,幸运的是可以实现.

Not really. I have found some articles regarding the multi-targeting option for WPF and Silverlight at the same time. At this moment, if you are not using PRISM, it is quite a challenge to target both of them, fortunately achievable.

您需要记住的是,Silverlight 使用比 WPF 更小的(因此更有限)的库.

What do you need to have in mind is that Silverlight uses a smaller (thus more limited) library than WPF.

回应评论:实际上,PRISM 中已经支持 Silverlight(v2).PRISM 的想法是为不仅使用 WPF 还使用 Silverlight 也 - Prism V2 正式被称为 WPF 和 Silverlight 的复合应用程序指南.通过将 PRISM 用于 Silverlight 功能,如果 无(可能除了visual studio 的不同项目类型).

In response to the comments: Actually, there is already support for silverlight in PRISM (v2). The idea of PRISM is to provide guidance to developing applications not only using WPF but using Silverlight also - Prism V2 formally was known as Composite Application Guidance for WPF and Silverlight. By using PRISM for silverlight capabilities, it would give you the warranty that your code would work on both platforms with minimal changes, if none (except maybe the different project types for visual studio).

当然,如果您已经开始开发应用程序,则需要更改代码以使用 PRISM.

But of course, if you already started developing your application, you would need to change your code to use PRISM.

这篇关于将 WPF 应用程序转换为 SilverLight的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆