WPF优于winforms的优点和缺点? [英] Advantages and disadvantages of WPF over winforms ?

查看:597
本文介绍了WPF优于winforms的优点和缺点?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,



WPF的优点和缺点是什么?

Winforms。



我所听到的只是UI优势,



使用WPF的优势还有什么?

Winform? ?



WPF的缺点是什么?



提前付款



Naveen ...

解决方案

WPF的优点包括:

1.能够相对轻松地制作非常丰富的UI。

2.更简单的动画和特效

3.固有的可扩展性



然而,WPF存在缺点,其中WinForms名列前茅:

1. WPF的内置控制套件远比那更受限制WinForms。

2. WinForms的第三方控制空间有更大的支持。 (这种情况正在发生变化,但是现在凭借时间优势,WinForms在社区中得到了更多支持。)

3.大多数开发人员已经了解WinForms; WPF提供了一个新的学习曲线

4.WPF将无法在Windows 2000或更低版本上运行。





如果您开展工作(或使用正确的第三方工具),您可以在任一工具中创建出色,有吸引力且引人入胜的用户界面。在所有情况下都不一定更好。使用对项目感觉合适的东西。



最后,阅读WPF并获得与之相关的错误点数! :thumbsup:


我是一个毫不掩饰的WPF支持者。



一个人对布局和外观有更大程度的控制与WPF。这是一个很大的问题,因为人们在视觉外观上判断软件的程度远远超过他们应该的程度。特别是DockPanels和StackPanels非常棒。此外,还有一个保证金属性,在需要进行微调时非常有用。绘图处于不同的层面。我在这个领域写了一些可能很有意思的文章。



我在WinForms中发现的主要问题是人们习惯了视觉控制的程度。网页。微妙的视觉变化通常是WinForms的大量工作。人们想做的大部分定制都需要GDI +编程。 GDI +是一种特殊类型的编程,并不是很完善。获取内存泄漏并不是特别具有挑战性。



WPF最大的问题是初始学习曲线。即使是经验丰富的开发人员,最初的体验也可能相当令人沮丧。还应该注意到对WPF的需求正在增长,这使得它成为一项教育工作的良好投资。



WPF vs WinForms-Control by control



ListBox
- WPF是明显的赢家。这是从一个令人兴奋的转变为一个非常好的控制。



ComboBox - 再次WPF是明确的赢家。



TreeView - 我更喜欢WPF树视图,因为它更灵活,但WinForms更容易使用。我会把这个称为tossup。



RichTextbox - 与Winforms相比,WPF Richtextbox的速度非常慢。即使它具有更大的灵活性,winforms也会更好。



网格 - WPF在网格部门不是很先进,但WPF网格场景肯定在改进。另一方面,似乎第三方网格是规则而不是例外,一些WinForms非常好。我在FlyGrid上工作了很多,这是非常快的;另一个用于WinForms。



如果你计划一个主要是网格或文本编辑的应用程序,那么WinForms可能还有很长的路要走。对于大多数其他任何我建议WPF


由于您已经对UI优势有了一些了解,我想指出它的一大优势是它具有极高的数据绑定能力。不仅可以轻松绑定到模型对象,还可以绑定到其他可视元素,这样您就可以根据其他地方的更改来更改项目的边距。



此外,您可以比WinForms应用程序更轻松地更改WPF应用程序的外观。默认情况下,标准WPF控件是无形的;这意味着它们提供了默认模板,但控件的实现并不依赖于此模板 - 因此您可以根据自己的内容自定义它。 UI是DirectX而不是GDI +,因此它可以利用DirectX中可用的加速和处理,并在3D中工作。我可以继续,但你明白了。



它有一个相当陡峭的学习曲线,但是一旦你超越了这个,你就不会想回到的WinForms。

Hi all,

What is advantage and disadvantages of WPF over
Winforms.

All i heard is only UI advantage ,

What else is the advantage of using WPF than
Winform ???

What are disadvantages of WPF also ?

Thanks in advance

Naveen...

解决方案

The advantages of WPF include:
1. The ability to make very rich UIs relatively easily.
2. Easier animation and special effects
3. Inherent scalability

However, there are drawbacks to WPF, where WinForms comes out on top:
1. WPF's in-box control suite is far more limited than that of WinForms.
2. There's greater support in the 3rd-party control space for WinForms. (That's changing, but for now by advantage of time, WinForms has greater support in the community.)
3. Most developers already know WinForms; WPF provides a new learning curve
4.WPF will not run on windows 2000 or lower.


You can create great, attractive and engaging UIs in either tool, if you do the work (or use the right 3rd party tools). Neither is necessarily better in all circumstances. Use what feels right for the project.

lastly, read about WPF and will get the srong points related to it! :thumbsup:


I am an unabashed supporter of WPF.

One has a much greater degree of control over layout and appearance with WPF. This is a big deal as people judge software on its visual appearance far more than they probably should. In particular DockPanels and StackPanels are wonderful. Also there is a margin property that helps enormously when minor adjustments are necessary. Drawing is on a different level. I have written a few articles on that field wich might be interesting.

The main problem I found with WinForms was that people got used to the degree of visual control on the web. Subtle visual changes were often a lot of work with WinForms. GDI+ programming is needed for much of the customization that one wants to do. GDI+ is a specialized type of programming and is not quite managed. Getting memory leaks is not particularly challenging.

The biggest problem with WPF is the initial learning curve. The initial experience is likely to be rather frustrating, even for an experienced developer. One should note also that the demand for WPF is growing, making it a good investment of one’s educational effort.

WPF vs WinForms -Control by control

ListBox
– WPF is the clear winner. This was turned from an unexciting to a really great control.

ComboBox – Again WPF is the clear Winner.

TreeView – I like the WPF treeview better as it is much more flexible but the WinForms one is significantly easier to use. I would call this one a tossup.

RichTextbox – The WPF Richtextbox is glacially slow in comparison to the Winforms one. Even though it has more flexibility the winforms one is better.

Grids – WPF is not as advanced in the grid department, but the WPF grid scene is definitely improving. On the other hand it seems like third party Grids are the rule rather than the exception, and some of the WinForms ones are very good. I worked quite a bit with FlyGrid which is astonishingly fast; another one for WinForms.

If you are planning an application that is mostly Grids or for text editing, then WinForms is probably still the way to go. For most anything else I would advise WPF


As you already have some knowledge of the UI advantages, I'd like to point out that one of its biggest advantages is its vastly superior databinding capability. Not only is it easy to bind to model objects, you can also bind to other visual elements, which allows you to do things such as change the margin of an item based on a change to a margin elsewhere.

Also, you can change the look and feel of a WPF application far easier than you can a WinForms app. By default, the standard WPF controls are lookless; this means that they provide a default template, but the implementation of the control does not rely on this template - so you can customise it to your hearts content. The UI is DirectX rather than GDI+ so it can make use of the acceleration and processing available in DirectX, and work in 3D. I could go on, but you get the idea.

It has a fairly steep learning curve, but once you get past this, you will not want to go back to WinForms.


这篇关于WPF优于winforms的优点和缺点?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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