WPF 与 Windows 窗体 [英] WPF vs Windows Forms

查看:24
本文介绍了WPF 与 Windows 窗体的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我对 WPF 和 Windows 窗体非常困惑.WPF 在 Windows 窗体上的用途是什么?WPF的用途是什么?

I am very confused about WPF and Windows Forms. What is the usage of WPF over Windows Forms? What is the usage of WPF?

推荐答案

WPF 是一个用于开发 Windows(和浏览器)应用程序的新平台.WPF 不一定要替换 Windows 窗体.使用 WPF,可以更轻松地向应用程序添加 3D、视频和动画.因为它是基于 XAML,所以也很容易绑定到 XML 数据,例如 data来自网络服务,并将其作为内容动态加载.

WPF is a new platform for developing applications for Windows (and for browsers). WPF is not necessarily there to replace Windows Forms. With WPF, it is easier to add 3D, video, and animations to your application. Because it is XAML based, it is also easy to bind to XML data, for example, data from a webservice, and dynamically load it as content.

在我看来,WPF 还可以更好地将 UI 编程与业务逻辑分开.让高级 WPF 设计师使用 Expression Blend 之类的工具构建您的 UI 会更容易,并且自己作为程序员,更关注后端.通过这种方式,它更像是让 HTML 和 CSS 前端为您的网站创建精美的设计,而您则在后端工作.

WPF also, in my opinion, better seperates the UI programming from the business logic. It is easier to have an advanced WPF designer build your UI with a tool like Expression Blend, and yourself as a programmer, focus more on the back-end. In that way, it is more like having an HTML and CSS frontender creating a slick design for your site, while you work on the back-end.

Windows Forms 有(就目前而言)更多的第三方控件可用,如果你真的不需要 WPF 带来的东西,那么你当然没有切换到 WPF.

Windows Forms has (as for now) more third-party controls available though, and if you don't really have a need for the stuff that WPF brings, then you certainly don't have to switch to WPF.

这篇关于WPF 与 Windows 窗体的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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