简体   繁体   English

从Winforms迁移到WPF

[英]Migration from Winforms to WPF

We are using Winforms using the Infragistic framework. 我们使用Infragistic框架使用Winforms。 We are considering the move to WPF. 我们正在考虑转向WPF。 The problem is that we have already several forms, dialogs etc in Winforms. 问题是我们已经在Winforms中有几个表单,对话框等。 We need common look and feel thus we need to migrate all to WPF. 我们需要共同的外观和感觉,因此我们需要将所有内容迁移到WPF。

Is there a migration tool to take Winforms and migrate to WPF? 是否有迁移工具来获取Winforms并迁移到WPF? I know it is not possible to do it completely but is there something that will do some of the work? 我知道不可能完全做到这一点,但有什么东西可以完成一些工作吗?

Thanks 谢谢

In my opnion, and depending on your architecture, a one on one translation is not really the right approach to go here: consider why you want to move to wpf, and evaluate whether you really want to commit to it. 在我的观点中,根据您的体系结构,一对一翻译并不是真正适合的方法:考虑为什么要转移到wpf,并评估您是否真的想要提交它。 It's a powerful framework, but there's quite a steep learning curve and to be really worth it you need to take the time to look at the user experience and see how wpf can help. 它是一个强大的框架,但是学习曲线相当陡峭,而且非常值得,您需要花时间查看用户体验并了解wpf如何提供帮助。 If you want to have the winforms look and feel, and just move to wpf because it's the next new thing, you're in for an unpleasant suprise. 如果你想拥有winforms的外观和感觉,并且只是转向wpf因为它是下一个新的东西,那么你就会感到不愉快。

Anayway, what we've done while migrating our winforms stuff is to make new screens in wpf, and keep hosting the old winforms screen using ElementHost and WindowsFormsHost . Anayway,我们在迁移winforms时所做的就是在wpf中制作新的屏幕,并使用ElementHostWindowsFormsHost继续托管旧的winforms屏幕。 These work really well by the way - we haven't had any problems with them so far. 顺便说一句,这些工作确实很顺利 - 到目前为止我们还没有遇到任何问题。 We then migrated screen by screen to wpf. 然后我们将屏幕逐屏迁移到wpf。 Looked like a Frankenstein in the mean time, but at least we had regular feedback and everything was functional. 同时看起来像弗兰肯斯坦,但至少我们有定期反馈,一切都很实用。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM