WinForm 转换为 Wpf [英] WinForm Conversion To Wpf

查看:55
本文介绍了WinForm 转换为 Wpf的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

可能的重复:
将 VB.NET 2.0 Winform 迁移到 3.5 WPF

我可以将整个 WinForm 应用程序转换为 wpf 应用程序吗?.我想将我的会计软件转换为 Wpf 可以吗?

Can I Convert my whole WinForm Application to wpf application?. I wants to convert my Accounting Software to Wpf Is it possible?.

推荐答案

否 - 没有从 Windows 窗体到 WPF 的直接转换 - 此外,直接执行此操作会很糟糕,并且会导致 WPF 应用程序的设计非常糟糕.

No - there is no direct translation from Windows Forms to WPF - in addition, doing this directly would be poor, and lead to a very poorly designed WPF application.

我在 我关于 WPF 和 MVVM 的系列 中对此进行了深入讨论 -特别是,"第 3 部分" 展示了使用与典型 Windows 窗体应用程序相同的方式编写 WPF 时会发生什么,但随后我继续说明为什么这是一个总的来说是个坏主意.

I discuss this in depth in my series on WPF with MVVM - in particular, "Part 3" shows what happens when you write WPF using the same manner as typical Windows Forms applications, but then I go onto show why this is a bad idea in general.

WPF 的核心是建立在与 Windows 窗体截然不同的编程范式之上.最好在 Windows Forms 中分离出您的业务逻辑,然后在 WPF 中编写一个新的 View 层来处理该逻辑.

WPF, at its core, is built upon a very different programming paradigm than Windows Forms. It would be better to separate out your business logic in Windows Forms, then write a new View layer in WPF to work with the logic.

这篇关于WinForm 转换为 Wpf的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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