Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: WPF
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...
Posted 18-Mar-10 1:03am
nav234434
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

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! Thumbs Up | :thumbsup:
  Permalink  
Comments
ridoy at 2-Sep-12 16:20pm
   
nice..+5
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 2

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.
  Permalink  
Comments
Pratik Bhuva at 7-Nov-13 3:56am
   
Good One
5ed :)
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 3

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
  Permalink  
Comments
ridoy at 2-Sep-12 16:19pm
   
i also support it..+5..WPF contains some better control than Winform
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 7

First off, WPF is not just for applications which simply require “eye candy.” That is the most common and frustrating misperception about WPF which I’ve encountered. Sure, WPF has a lot of support for flashy visuals and animations. But that’s not all it’s good for. If you’ve worked with WPF for any substantial period of time you are probably well aware of this fact, so I won’t keep harping on the issue.
WPF is an especially great platform to use if your applications involve various media types. For example, if you need to incorporate video, or documents, or 3D content, or animated transitions between a sequence of images, or a combination of any of the above. WPF is also great if you need to create a skinned user interface, or if you need to bind to XML data, or dynamically load portions of a user interface from a Web service, or want to create a desktop application with a Web-like navigation style.
Another great reason to use WPF is if you have a team of developers who are bored with WinForms and are itching to get into something new and cool. Of course this is not as powerful and compelling a reason from a business perspective, but nothing promotes employee retention better than keeping the employees interested in their jobs.
WinForms definitely still has a role to play, despite the fact that WPF has hit the scene. If you are building applications with no need for the extensive modern functionality in WPF, then there is no compelling reason to leave behind a time-tested developer-approved platform. WinForms certainly has more 3rd party controls available, online resources, developer communities, etc. than WPF currently does. It’s much easier to find WinForms developers than WPF developers. Also, WinForms currently has a much better design-time experience in Visual Studio than WPF. That fact alone is a very compelling reason to stick with WinForms for a while.

WPF is just a different type of Windows-based solution when compared to WinForms. Microsoft has not stated anything about WPF replacing WinForms, when, in fact, it is just another tool available to the Windows developer.

WPF :
1. The ability to make very rich UIs relatively easily.
2. Easier animation and special effects
3. Inherent scalability
4. Powerfull styling and skinning structure
5. Easy to create an own Look and Feel
6. Does support Windows Forms
7. The future technology for developing Vista Applications
8. The ability to reuse existing code
9. Highly advanced databinding possible
10. Declarative vs procedural code
11. Requires .NET Framework 3.0
12. Compared to Windows Forms, still in development fase
13. Requires Dx9 compatible vidcard for advanced graphics
 
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.WPF will not run on windows 2000 or lower.
4. Extensive documentation to be found on the internet FOR WIN Forms
5. Plenty of examples FOR WIN Forms
6. Design your own look and feel in a application is a lot of work.
7.C# is slower to run. This is somewhat taken care of when using WPF, although currently the launching of WPF application is still a bit slow. However, after the program is launched, the animation effects are all very smooth.
 
Imran Parvez
Agilis
MCTS
 

Reference : http://abhijit-k-adhikari.me/category/wpf/[^]
  Permalink  
v8
Comments
pashad at 15-Mar-12 9:37am
   
Good one +5
ridoy at 2-Sep-12 16:18pm
   
good description..+5
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 9

Winform over WPF,
 
Winform takes smaller resources than WPF. Try this : Create 1 winform project, just empty form. Create 1 WPF project, just empty window. Build them using same framework. Run both of them and compare. I'm using Process Explorer
 
WPF over Winform,
 
WPF is easy to customize. Nearly all of the control can be mixed. For example : combobox showing images with text.
 
Conclusion,
 
If you just need simple app, just use winform. If you need "eye candy" app, use WPF. If you need light apps, use winform. If you lazy to create complex UI, use Wpf.
  Permalink  
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 13

Created a small video which explains the same in ABCDEFG format.
 
http://www.youtube.com/watch?v=SD3yVqpu4e4[^]
 
I know this is a old question but i think the above video will add more value to the comments above. Visual is visual at the end of the day.
 
Many people who search they land on this link from google.Hope the video adds value for people who are coming to this answer.
  Permalink  
v2
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 4

I think i like the separations of concerns that WPF gives you just like ASP.Net code behind files.So WPF will be the way to go in future.
  Permalink  
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 6

Alot of nice reading material on the subject can be found at this link.
 
read the white paper: The New Iteration: How XAML Transforms the Collaboration Between Designers and Developers in WPF, or scroll down to read up on the vivid discusion.
 
http://social.msdn.microsoft.com/Forums/en-US/wpf/thread/31251c20-da8f-4042-9920-302efb6bd567[^]
  Permalink  
v2
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 11

Hello there. in my experience WPF is more and more powerfull than windowsform.
For example :
1- wpf has XAML language . this language is a declrative and when you write one line of code in xaml then you can see result instantly.
2-WPF supports WYSIWYG concept. for example : you need draw a curve line in your app between two points . so by wpf in XAML designer you can use PathGeometry and see result instantly.don't need build operation for seeing result.
3-WPF can interoperability with WindowsForm and Win32.
4- WPF animation is wonderfull.
5-WPF support FlowDocument. for example : you can create a document than contains 3D objects and these object can animate.
6- By this line of XAML:
xmlns:clr="clr-namespace:System;assembly=mscorlib"
you can use any .Net CLR objects in XAML. for example : String,Array and then create array of string for ListBox.ItemsSource. you don't need C# code.
7-By WPF you can create any effect for Image such as Brush,Size,Clipping,Transforming,...
Complex gradient. so you don't need know anything about PhotoShop.
I hope this help you.
Good luck
  Permalink  
Comments
CHill60 at 8-Jul-13 8:42am
   
The question is over 3 years old and already has several comprehensive answers
ali rad at 9-Jul-13 3:35am
   
never mind.
adriancs at 20-Jun-14 22:49pm
   
But I'm still looking today. it would be grateful if there are some more different points of view.
CHill60 at 21-Jun-14 10:45am
   
Solutions 1,2,3 & 7 cover all the salient points. As in most things there is no "best" choice....it entirely depends on what you want to do and what you are more comfortable with
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 12

Take a look at this article explains about Winforms vs WPF
  Permalink  
Comments
Wes Aday at 14-Jul-14 20:23pm
   
You are kidding right? Dredging up a 4 year old already answered question for what reason?
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 14

Basically difference between both of them is Designing section Coding section is almost same.

Although below are the diffrences

 
WPF
+ Powerfull styling and skinning structure
 
+ Easy to create an own Look and Feel
+ The future technology for developing Vista Applications
+ The ability to reuse existing code
+ databinding works and is simple . Highly advanced databinding possible
 
+ Much quicker to develop normal apps . ( Forms is probably quicker for v simple apps) - once you are experienced,
+ Declarative vs procedural code ( You can use Procedural if you want)
 
+ Requires a lot less code behind to do common things. Framework much smarter.
 
+ Much more maintainable apps (from better databinding and declarative code with better seperation) .
 
+ Excellent layout
 
+ Excellent document support.
 
+ Multi media support.
- Requires .NET Framework 3.0
- Compared to Windows Forms, still in development phase (?? not sure about this - sure some controls are missing ( calander/datetime) but the framework is miles better
- Requires Dx9 compatible vidcard for advanced graphics
 
- Considerable learning curve .
 
Windows Forms:
+ Extensive documentation to be found on the internet
+ Plenty of examples
 
+ Many mature 3rd party controls available
 
+ Very quick to develop simple data bound applications ( eg a single form with a grid) , once you get to master detail WPF probably better.
 
+ Easy to get started.
- DataBinding is a pain in the butt.. Ok for simple scenarios but when your client wants something a bit out of the norm you will end up pulling the bindings out and do it manually,
- How long will this be supported? (I've read somewhere that Microsoft is only developing WPF now, only maintanance for Winforms)
- Design your own look and feel in a application is a lot of work.
 
- Cant do advanced graphics
- Compared to web components and WPF relatively feature poor though mature. Most of the code is just wrappers around the Com UI objects. Which can lead to very painfull problems. Extending it is much more painfull than WPF .
  Permalink  

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 BillWoodruff 330
1 Mathew Soji 309
2 Maciej Los 285
3 DamithSL 225
4 Afzaal Ahmad Zeeshan 207
0 OriginalGriff 6,369
1 Sergey Alexandrovich Kryukov 5,973
2 DamithSL 5,183
3 Manas Bhardwaj 4,673
4 Maciej Los 4,025


Advertise | Privacy | Mobile
Web01 | 2.8.1411019.1 | Last Updated 21 Jul 2014
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100