将 WPF 转换为 Web
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/14661534/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Converting WPF to Web
提问by Rizwan
My application is built into WPF using Infragistics control(xaml).
我的应用程序使用 Infragistics control(xaml) 内置到 WPF 中。
I wanted to port the existing app into Web but we don't want to use silverlight(for silverlight we need plugin to be available in our browser and target users will not be having permission to install any plugin into their browser) is there any third part control available which helps us to port our WPF pages into WEB faster.
我想将现有的应用程序移植到 Web 上,但我们不想使用 Silverlight(对于 Silverlight,我们需要在浏览器中提供插件,而目标用户将无权将任何插件安装到他们的浏览器中)是否有任何第三方部分控件可用,这有助于我们更快地将 WPF 页面移植到 WEB 中。
回答by Denys Wessels
There are two ways to port WPF to web:
有两种方法可以将 WPF 移植到 Web:
- Silverlight (which you said you can't use) and
- WPF XAML Browser Applications
- Silverlight(你说你不能使用)和
- WPF XAML 浏览器应用程序
Those are the only options I'm aware off.
这些是我所知道的唯一选择。
If you want to convert your WPF app to ASP.NET Web forms or MVC you would have to do it manually.To make it easier you could create shared code which can be used by both WPF and the web application.
如果您想将 WPF 应用程序转换为 ASP.NET Web 表单或 MVC,您必须手动完成。为了更容易,您可以创建可供 WPF 和 Web 应用程序使用的共享代码。
If you've followed the MVVM pattern in the WPF project that will make your job a lot easier as you can re-use the view model in MVC (with minor changes)
如果您在 WPF 项目中遵循了 MVVM 模式,这将使您的工作更轻松,因为您可以在 MVC 中重用视图模型(只需稍作更改)

