将 XAML WPF 窗口转换为 WinForm
是否有任何实用程序或转换器可以将 XAML WPF 窗口转换为 .Net 2.0 Windows 窗体?
Is there any utility or converter to convert XAML WPF window to .Net 2.0 Windows forms form?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
不,而且不太可能有这样的事情; WPF 和 WinForms 是不同的框架,由于 UI 组成、布局差异、定位系统不同等差异,WPF UI 无法真正转换为 WinForms UI。
No, and there's unlikely to be anything like this; WPF and WinForms are disparate frameworks, a WPF UI can't really be converted to a WinForms UI due to differences in UI composition, layout differences, different positioning systems, etc.
没有工具可以将其转换。可能值得使用 ElementHost 在 WPF 中加载 WPF 组件,这样您就不需要转换并可以重用 WPF 组件。如果您有 WPF 窗口,则需要将其转换为 UserControl 才能工作。
编辑:
.Net 2加载WPF控件的代码
There is no tool to convert it across. It might be worth using an ElementHost to load WPF components in WPF, that way you don't need to convert and can re-use WPF components. If you have a WPF window you would need to convert this to a UserControl to work.
EDIT:
.Net 2 code to load WPF control
也许您可以将此 Xaml 库用于 WinForms?
https://winformsxaml.codeplex.com
Maybe you could use this Xaml library for WinForms?
https://winformsxaml.codeplex.com