简体   繁体   English

将 .NET windows 控件升级到 WPF 控件的最佳方式?

[英]Best way of upgrading .NET windows controls to WPF controls?

We are about to upgrade a C# windows application (1.1) to WPF from windows controls (3.5).我们即将将C# windows 应用程序(1.1) 升级到WPF控件从Z0F4137ED13502B5044526 控件

  • Do you have any suggestions on where to start你对从哪里开始有什么建议吗
  • Any tips & tricks ?任何提示和技巧
  • What to avoid ?避免什么?

The window controls (1.1 .NET) are present in a separate project within the solution together with our "entrypoint" and "process controller" for the application. window 控件(1.1 .NET)与应用程序的“入口点”和“过程控制器”一起存在于解决方案中的一个单独项目中。

I'd recommend starting small, as the learning curve for WPF/Xaml is pretty steep, I reckon a competant C#/WinForms developer will take 6 months to get comfortable - so your "...big application and lots of business logic..." is probably not a great candidate to start with.我建议从小处着手,因为 WPF/Xaml 的学习曲线非常陡峭,我认为有竞争力的 C#/WinForms 开发人员需要 6 个月才能适应 - 所以你的“...大型应用程序和大量业务逻辑.. .” 可能不是一个很好的开始。

OTOH if you're team is already upto speed with WPF, the real first step is deciding what features the users want that can be best served by the graphical niceties of WPF. OTOH,如果您的团队已经熟悉 WPF,那么真正的第一步是确定用户想要哪些功能可以通过 WPF 的图形细节得到最好的服务。 If they really do want 3D spinning forms, then implement a good working prototype of that, if they want resizing documents, then do that.如果他们真的想要 3D 旋转 forms,那么实现一个好的工作原型,如果他们想要调整文档大小,那么就这样做。 This is an elephant of a problem, you can only solve it a small piece at a time.这是一个大象问题,一次只能解决一小部分。

A key thing to decide really early on is whether to go MVC or one it's various offspring.尽早决定的关键是是 go MVC 还是它的各种后代。 That decision will shape where you put your code.该决定将决定您放置代码的位置。 As WPF is heavily dependant upon binding, you can't move forward until you know how/when/where that binding is going to happen.由于 WPF 严重依赖于绑定,因此在您知道绑定将如何/何时/何地发生之前,您无法继续前进。

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

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