如何从WPF项目创建Silverlight应用程序? [英] How do I create a Silverlight application from my WPF project?

查看:71
本文介绍了如何从WPF项目创建Silverlight应用程序?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个WPF应用程序项目文件,我无法弄清楚如何将其保存为Silverlight应用程序(我想在我的网页上显示它)。

如何将其保存为网页或者我可以在我的网页中包含的文件?

或者有没有办法导入我现有的WPF成为Silverlight应用程序?我知道我可以创建一个新项目作为Silverlight应用程序,但是如何将现有的WPF应用程序用作Silverlight应用程序(因此我可以创建一个网页)

I have a WPF application project file and I cannot figure out how to save it as a Silverlight applications (I want to display it on my webpage).

How do I save it as a webpage or a file I can include in my webpage?

Or is there a way to import my existing WPF to become a Silverlight application? I know I can create a new project as a Silverlight application, but how can I take an existing WPF application and use it like a Silverlight application (so I can make a webpage)

推荐答案

我认为你不能这样做,因为它们是两个不同的框架。
成本最低的工作是创建一个新的Silverlight项目,然后复制xaml和代码。 Silverlight中可能不存在某些WPF类/方法,您必须找到替换。
I don't think you can do that because they are 2 different frameworks.
The least-cost work is create a new Silverlight project, then copy the xaml and code behind over. Some WPF class/methods might not exist in Silverlight, you have to find replacement.


这篇关于如何从WPF项目创建Silverlight应用程序?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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