Nipun
Nipun

Reputation: 1485

WPF vs Windows Forms

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

Upvotes: 4

Views: 2782

Answers (4)

Kent Boogaart
Kent Boogaart

Reputation: 178660

Have you seen WPF or WinForms, choose wisely ?

In short, WPF is the next UI platform for Microsoft Windows. It learns a lot of lessons from previous technologies, but the risk is immaturity of tooling and third-party components.

Upvotes: 4

Razzie
Razzie

Reputation: 31222

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 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 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.

Upvotes: 7

Bek Raupov
Bek Raupov

Reputation: 3777

One more thing I like about WPF is that the core graphics processing has been shifted from GDI+ to DirectX. That makes a huge performance benefit when you are working on 3D or heavy grid/time series plotters as it tries to consume your GPU (graphical) resources rather than CPU.

Upvotes: 0

dommer
dommer

Reputation: 19810

One benefit is the separation of concerns. You can build your application without worrying too much about UI stuff like layout, colours, fonts, etc. Then you can pass it to a designer who can make it look amazing (hopefully) without needing to understand code (using Blend or some other tool).

From a purely pragmatic point of view, my choice of which framework to employ is often down to which third-party controls I need to use (although you can use a WPF control in a WinForms app, for example - using hosting controls).

Upvotes: 0

Related Questions