<p>Most restrictions and tricks with windows forms are common to most programmers. But since .NET 3.0 there is also WPF available, the Windows Presentation Foundation. It is said that you can make "sexy applications" more easy with it and with .NET 3.5 SP1 it got a good speed boost on execution.</p>

<p>But on the other side a lot of things are working different with WPF. I will not say it is more difficult but you have to learn "everything" from scratch.</p>

<p>My question: Is it worth to spend this extra time when you have to create a new GUI and there is no time pressure for the project?</p>

[{'answer_id': 57914, 'author': 'Serafina Brocious', 'author_id': 4977, 'author_profile': 'https://Stackoverflow.com/users/4977', 'pm_score': 2, 'selected': False, 'text': "<p>If you only care about supporting Windows and don't mind the time it takes to learn it, go with WPF.  It's fast, flexible, easy to reskin, and has great tools to work with it.</p>\n"}, {'answer_id': 57925, 'author': 'GEOCHET', 'author_id': 5640, 'author_profile': 'https://Stackoverflow.com/users/5640', 'pm_score': 4, 'selected': False, 'text': "<p>I think it is worth learning WPF. Once you are up to speed, design work on your forms is much easier IMHO. I wouldn't worry as much about the 'sexy' stuff. Most of this is just a fad. You can make 'normal' Winforms-style applications very quickly and easy in WPF.</p>\n\n<p>The whole concept lends itself to easier design IMO.</p>\n"}, {'answer_id': 58037, 'author': 'denis phillips', 'author_id': 748, 'author_profile': 'https://Stackoverflow.com/users/748', 'pm_score': 4, 'selected': False, 'text': '<p>There is a very steep learning curve to WPF, and I recommend you get the obvious books first (<a href="https://rads.stackoverflow.com/amzn/click/com/0672328917" rel="nofollow noreferrer" rel="nofollow noreferrer" title="Windows Presentation Foundation Unleashed (WPF)">Adam Nathan</a>, \n<a href="https://rads.stackoverflow.com/amzn/click/com/0596510373" rel="nofollow noreferrer" rel="nofollow noreferrer" title="Programming WPF">Sells/Griffiths</a>, and \n<a href="https://rads.stackoverflow.com/amzn/click/com/0321374479" rel="nofollow noreferrer" rel="nofollow noreferrer" title="Essential Windows Presentation Foundation (WPF)">Chris Anderson</a>) and \nblogs (<a href="http://joshsmithonwpf.wordpress.com/" rel="nofollow noreferrer">Josh Smith</a>, etc.). Just be prepared for it, and make sure your project allows you the time to learn WPF.</p>\n\n<p>In addition to learning the technology, spend some time learning the patterns used to construct WPF applications. <a href="http://en.wikipedia.org/wiki/Model_View_ViewModel" rel="nofollow noreferrer">Model View ViewModel</a> (MVVM) seems to be the one that has gained a great deal of acceptance.</p>\n\n<p>Personally, I think WPF is worth it but be forewarned. Also note that you effectively restrict your users to Windows XP SP2+ and Windows&nbsp;Vista. We\'ve made that decision, but you may have some different requirements.</p>\n'}, {'answer_id': 58077, 'author': 'Rob Allen', 'author_id': 149, 'author_profile': 'https://Stackoverflow.com/users/149', 'pm_score': 2, 'selected': False, 'text': '<p>If you have an MSDN license, check out <a href="http://www.microsoft.com/expression/" rel="nofollow noreferrer">Expression tools</a>. It\'s designed explicitly for WPF, exports directly to Visual Studio and it may help ease your transition.</p>\n'}, {'answer_id': 58084, 'author': 'ScottG', 'author_id': 3047, 'author_profile': 'https://Stackoverflow.com/users/3047', 'pm_score': 4, 'selected': False, 'text': '<p>We are currently rewriting our application in WPF from Windows Forms. Yes, there is a steep learning curve and you have to "re-learn" some things, but it is so worth it. And combined with WCF, we are finding we are writing less code, faster, and more robust than ever before. </p>\n\n<p>Stick with it for a while, read <a href="https://rads.stackoverflow.com/amzn/click/com/0672328917" rel="nofollow noreferrer" rel="nofollow noreferrer">Adam Nathan\'s book</a>, and check out the ever growing library of third-party controls like those from <a href="http://www.telerik.com/products/wpf/overview.aspx" rel="nofollow noreferrer">Telerik</a> and <a href="http://www.componentone.com/" rel="nofollow noreferrer">ComponentOne</a>. One negative, in my view, is that the design tool, <a href="http://en.wikipedia.org/wiki/Microsoft_Expression_Blend" rel="nofollow noreferrer">Expression Blend</a>, is very awkward to use. The latest version is still in beta, but it just doesn\'t feel right to those of us who have used Visual Studio for years. Yes, it\'s mainly for designers, but some things you just can\'t do in Visual Studio.</p>\n'}, {'answer_id': 61248, 'author': 'Nidonocu', 'author_id': 483, 'author_profile': 'https://Stackoverflow.com/users/483', 'pm_score': 2, 'selected': False, 'text': '<p>As a side bonus, Silverlight is based on WPF and starting with either lets you gain the know how for working with the other. If things continue to go web based, having prior knowledge (and a library of existing code) to transfer easily to the browser (or Windows Live Mesh) might help give your software an extra lease of life.</p>\n'}, {'answer_id': 66550, 'author': 'Vin', 'author_id': 1747, 'author_profile': 'https://Stackoverflow.com/users/1747', 'pm_score': 2, 'selected': False, 'text': '<p>If you decide to go with WPF, considering pros and cons already explained in the above answers, I highly recommend going through this <a href="http://www.dnrtv.com/default.aspx?showNum=115" rel="nofollow noreferrer">dnrTV episode with Billy Hollis</a></p>\n'}, {'answer_id': 75387, 'author': 'AndyL', 'author_id': 9944, 'author_profile': 'https://Stackoverflow.com/users/9944', 'pm_score': 7, 'selected': True, 'text': '<p>WPF enables you to do some amazing things, and I LOVE it... but I always feel obligated to qualify my recommendations, whenever developers ask me whether I think they should be moving to the new technology.</p>\n\n<p>Are your developers willing (preferrably, EAGER) to spend the time it takes to learn to use WPF effectively?  I never would have thought to say this about MFC, or Windows Forms, or even unmanaged DirectX, but you probably do NOT want a team trying to "pick up" WPF over the course of a normal dev. cycle for a shipping product!</p>\n\n<p>Do at least one or two of your developers have some design sensibilities, and do individuals with final design authority have a decent understanding of development issues, so you can leverage WPF capabilities to create something which is actually BETTER, instead of just more "colorful", featuring gratuitous animation?</p>\n\n<p>Does some percentage of your target customer base run on integrated graphics chip sets that might not support the features you were planning -- or are they still running Windows 2000, which would eliminate them as customers altogether?  Some people would also ask whether your customers actually CARE about enhanced visuals but, having lived through internal company "Our business customers don\'t care about colors and pictures" debates in the early \'90s, I know that well-designed solutions from your competitors will MAKE them care, and the real question is whether the conditions are right, to enable you to offer something that will make them care NOW.</p>\n\n<p>Does the project involve grounds-up development, at least for the presentation layer, to avoid the additional complexity of trying to hook into incompatible legacy scaffolding (Interop with Win Forms is NOT seamless)?</p>\n\n<p>Can your manager accept (or be distracted from noticing) a significant DROP in developer productivity for four to six months?</p>\n\n<p>This last issue is due to what I like to think of as the "FizzBin" nature of WPF, with ten different ways to implement any task, and no apparent reason to prefer one approach to another, and little guidance available to help you make a choice.  Not only will the shortcomings of whatever choice you make become clear only much later in the project, but you are virtually guaranteed to have every developer on your project adopting a different approach, resulting in a major maintenance headache.  Most frustrating of all are the inconsistencies that constantly trip you up, as you try to learn the framework.</p>\n\n<p>You can find more in-depth WPF-related information in an entry on my blog:</p>\n\n<p><a href="http://missedmemo.com/blog/2008/09/13/WPFTheFizzBinAPI.aspx" rel="nofollow noreferrer">http://missedmemo.com/blog/2008/09/13/WPFTheFizzBinAPI.aspx</a></p>\n'}, {'answer_id': 163582, 'author': 'cplotts', 'author_id': 22294, 'author_profile': 'https://Stackoverflow.com/users/22294', 'pm_score': 2, 'selected': False, 'text': '<p><a href="http://geekswithblogs.net/lbugnion/archive/2007/05/13/WPF-The-integrator.aspx" rel="nofollow noreferrer">Scott is complaining about Expression Blend</a> and how it doesn\'t make sense to him as a developer. My first reaction to Expression Blend was like that. However, now I see it as an invaluable tool, but it really depends on what type of developer you are.</p>\n\n<p>I am user interface developer that has had to perform the <a href="http://geekswithblogs.net/lbugnion/archive/2007/05/13/WPF-The-integrator.aspx" rel="nofollow noreferrer">Integrator</a> role, and I eventually found Expression Blend invaluable to create styles, and control templates in a WYSIWYG manner. I almost always have Expression Blend and Visual Studio up an running on the same project at the same time.</p>\n\n<p>I also think that playing around in Expression Blend and taking a look at the <a href="http://en.wikipedia.org/wiki/Extensible_Application_Markup_Language" rel="nofollow noreferrer">XAML</a> that gets spit out is an excellent way to learn the WPF API ... much like using the designer in Windows Forms and checking the C# code it spits out is helpful in learning how to use whatever you are designing there.</p>\n\n<p>Expression Blend is helpful. Just give it a try, especially if you are working on the visuals for the application.</p>\n'}, {'answer_id': 202104, 'author': 'Jon Tackabury', 'author_id': 343, 'author_profile': 'https://Stackoverflow.com/users/343', 'pm_score': 3, 'selected': False, 'text': "<p>The biggest consideration when deciding which one to use is to consider what .NET Framework your target audience have installed. I find that more people have the lower .NET Framework versions that only support Windows Forms, but that's just my personal experience.</p>\n"}, {'answer_id': 202106, 'author': 'Franci Penov', 'author_id': 17028, 'author_profile': 'https://Stackoverflow.com/users/17028', 'pm_score': 1, 'selected': False, 'text': '<p>WPF\'s support for declarative UI through XAML, rich controls templating and styling and tools like <a href="http://en.wikipedia.org/wiki/Microsoft_Expression_Blend" rel="nofollow noreferrer">Expression Blend</a>, makes it a lot better for designers to work with developers on the same project. Plus, it gives the developers the flexibility of attached dependency properties and the extremely powerful databinding. In addition Silverlight supports a subset of XAML and the same control classes as WPF, so your application can be ported as <a href="http://en.wikipedia.org/wiki/Rich_Internet_application" rel="nofollow noreferrer">RIA</a> with minimal efforts.</p>\n\n<p>I would choose WPF over Windows Forms any day. Even if the target machines only have <a href="http://en.wikipedia.org/wiki/.NET_Framework_version_history#.NET_Framework_2.0" rel="nofollow noreferrer">.NET 2.0</a>, if the user can install additional programs, the new .NET Framework Client profile makes it quite easy to deploy WPF applications.</p>\n\n<p>The only reason I might decide to stick with Windows Forms is if the product will be deployed on machines that are locked down and have only .NET 2.0 or .NET 1.1.</p>\n'}, {'answer_id': 202114, 'author': 'Alex', 'author_id': 26564, 'author_profile': 'https://Stackoverflow.com/users/26564', 'pm_score': 3, 'selected': False, 'text': "<p>The advantages of WPF is that it is much easier to create nice looking GUI's with custom controls and animations. WPF also helps further serparate the presentation and logic layers. If you have designers, it allows you to farm of 95% of this work to non-coders and allows the coders to work on logic. The disadvantages are the software costs for Expressions Blend, and the lack of any of the Visual Studio code profiling tools working well as they tend to get caught up in the frameworks calls in trying to render XAML. I am sure there are others but these were the only two we really saw.</p>\n\n<p>The main consideration is if you wish to require your customers to have to install .NET 3.0 or even better .NET 3.5 SP1. You will get some niegative feedback</p>\n"}, {'answer_id': 202119, 'author': 'amcoder', 'author_id': 26898, 'author_profile': 'https://Stackoverflow.com/users/26898', 'pm_score': 3, 'selected': False, 'text': '<p>There are many differences. We loved WPF for:</p>\n\n<ol>\n<li>The declarative style of programming.</li>\n<li>Animations and state transitions</li>\n<li>Expression Blend is a great tool</li>\n<li>Good style support.</li>\n</ol>\n\n<p>However, we stuck with Windows Forms because:</p>\n\n<ol>\n<li>The extra time it takes for a\ndeveloper to learn WPF when they\nalready know Windows Forms.</li>\n<li>WPF will not run on Windows 2000 or\nlower.</li>\n</ol>\n'}, {'answer_id': 202310, 'author': 'John Rudy', 'author_id': 14048, 'author_profile': 'https://Stackoverflow.com/users/14048', 'pm_score': 6, 'selected': False, 'text': '<p>As others have said, there are advantages and disadvantages either way you go here. The advantages of WPF, as others have said, include:</p>\n\n<ul>\n<li>The ability to make very rich UIs <em>relatively</em> easily.</li>\n<li>Easier animation and special effects</li>\n<li>Inherent scalability (use the Windows&nbsp;Vista magnifier tool on a WPF application, and on a Windows Forms application: Note that in the WPF application, all the vector art scales beautifully)</li>\n<li>(OPINION ALERT) I feel it\'s "easier" to do document-oriented systems in WPF</li>\n</ul>\n\n<p>However, there are drawbacks to WPF, where Windows Forms comes out on top:</p>\n\n<ul>\n<li>WPF\'s in-box control suite is far more limited than that of Windows Forms.</li>\n<li>There\'s greater support in the third-party control space for Windows Forms. (That\'s changing, of course, but think about it: Windows Forms has been around since 2001; WPF just a few years. By advantage of time, Windows Forms has greater support in the community.)</li>\n<li>Most developers already know Windows Forms; WPF provides a new learning curve</li>\n</ul>\n\n<p>Finally, bear in mind that you can create great, attractive and engaging UIs in either tool, if you do the work (or use the right third-party tools). At the end of the day, neither is necessarily better in all circumstances. Use what feels right for the project.</p>\n'}, {'answer_id': 388717, 'author': 'cletus', 'author_id': 18393, 'author_profile': 'https://Stackoverflow.com/users/18393', 'pm_score': 6, 'selected': False, 'text': "<p>WPF requires either Windows&nbsp;Vista or Windows XP SP2, which is not an onerous requirement, but it is a relevant one. If you want to run on Windows 2000 (which some people still do), then WPF won't work for you.</p>\n\n<p>WPF is also a newer technology and not as proven as Windows Forms so you might choose Windows Forms as a less risky option, particularly for larger applications.</p>\n\n<p>That being said, yes WPF is the future. Visual Studio 2010 is being rewritten in WPF, which will probably be the largest WPF application to date and it will also be a real test for the technology.</p>\n\n<p>Obviously, legacy Windows Forms applications would be another situation where it is the correct choice.</p>\n"}, {'answer_id': 388736, 'author': 'Oleg', 'author_id': 47856, 'author_profile': 'https://Stackoverflow.com/users/47856', 'pm_score': 4, 'selected': False, 'text': '<p>Both of technologies have their pros and cons. In a large application with a "classic" UI I\'d use Windows Forms. In an application which require a rich user interface (skinning, animations, changing user interface) I\'d choose WPF. Please check the article <em><a href="http://joshsmithonwpf.wordpress.com/2007/09/05/wpf-vs-windows-forms/" rel="nofollow noreferrer">WPF vs. Windows Forms</a></em> comparing WPF and Windows Forms.</p>\n'}, {'answer_id': 388739, 'author': 'David Lay', 'author_id': 6359, 'author_profile': 'https://Stackoverflow.com/users/6359', 'pm_score': 3, 'selected': False, 'text': "<p>Consider WPF if interface design is important to you, because WPF can deliver better UI experience. But Windows Forms has on its side the years of evolution, so it's proven to work and you can find many versed programmers for that platform.</p>\n\n<p>Also portability may be an issue, WPF only works with Windows&nbsp;XP SP2 and up.</p>\n\n<p>Also, WPF has a steep learning curve, meaning it's not easy to deliver a quality product without having specific WPF experience.</p>\n"}, {'answer_id': 388755, 'author': 'Marc Gravell', 'author_id': 23354, 'author_profile': 'https://Stackoverflow.com/users/23354', 'pm_score': 3, 'selected': False, 'text': '<p>Well, one answer is "when you have to support 1.1 or 2.0", since WPF is part of .NET 3.0. There are known OS limitations for WPF, and there is an obvious skills issue: if you have a team of developers that know winforms, then it may be easier to turn out robust code <em>with</em> winforms. However, if you are writing a lot of UI code it is probably worth beginning to pick up WPF at some point.</p>\n\n<p>WPF also shares a lot in common with Silverlight, so it has transferable benefits.</p>\n'}, {'answer_id': 388762, 'author': 'Jonathan Beerhalter', 'author_id': 18927, 'author_profile': 'https://Stackoverflow.com/users/18927', 'pm_score': 3, 'selected': False, 'text': '<p>WPF makes it much easier to hand off the forms design work to an actual designer, not a developer in designer\'s clothing. If that\'s something you\'d like to do, WPF is your answer. If the classic Windows styled buttons are fine, then Windows Forms is probably the way to go.</p>\n\n<p>(Multiple answers make the claim that you should use WPF if interface design is "important to you" but that\'s pretty vague. Interface design is always "important".)</p>\n'}, {'answer_id': 388894, 'author': 'TimothyP', 'author_id': 28149, 'author_profile': 'https://Stackoverflow.com/users/28149', 'pm_score': 3, 'selected': False, 'text': '<p>WPF comes with many advantages such as superb data binding features,\nseparation of concerns, separation of design and logic etc...</p>\n\n<p>As a developer I enjoy the ability to define my UI using XAML as opposed to\nbeing tied to the Windows Forms designer and I feel good knowing I can count\non another designer to make my app look good.</p>\n\n<p>Personally I don\'t care older versions of Windows are not supported,\nbut one of the big problems with WPF is that is is not (currently/ever) supported\nby Mono (<a href="http://www.mono-project.com" rel="nofollow noreferrer">http://www.mono-project.com</a>) so WPF apps will not run on Mac OS or Linux.\n(Altough Silverlight applications will).</p>\n\n<p>If you have the time and resources to invest in learning WPF, do it!\nEven if you\'re going to be writing Silverlight applications to support multiple OS\'s.</p>\n\n<p>If you need desktop applications to run on multiple OS\'s stick with SWF.</p>\n'}, {'answer_id': 391122, 'author': 'Joachim Kerschbaumer', 'author_id': 20227, 'author_profile': 'https://Stackoverflow.com/users/20227', 'pm_score': 4, 'selected': False, 'text': '<p>I don\'t agree with some of the answers here. WPF is really well suited for <a href="http://en.wikipedia.org/wiki/Line_of_business" rel="nofollow noreferrer">line of business</a> (LOB) applications. (The frog design LOB client is the best example). And besides all the possibilities to have your UI be eye candy (which is not necessary in business applications), WPF offers a lot more for you.</p>\n\n<p>The data binding and templating features are just superior to Windows Forms. It also offers a far better way for separating code and presentation.\nWe\'ve successfully used WPF for 2 LOB applications in teams with no more than 2-3 developers.</p>\n\n<p>The biggest problem you will face is probably the steep learning curve of WPF (compared to Windows Forms) which will decrease development speed with developers not used to WPF.</p>\n'}, {'answer_id': 394107, 'author': 'Echiban', 'author_id': 42536, 'author_profile': 'https://Stackoverflow.com/users/42536', 'pm_score': 0, 'selected': False, 'text': '<p>For conversion projects (from <a href="http://en.wikipedia.org/wiki/Visual_Basic#Timeline" rel="nofollow noreferrer">Visual Basic 6.0</a>), it\'s hard to get a team to switch to WPF. Besides the learning curve, people are already used to the old interface. Windows Forms, although being phased out, will be around for a long time still. </p>\n'}, {'answer_id': 507953, 'author': 'Jim Anderson', 'author_id': 42439, 'author_profile': 'https://Stackoverflow.com/users/42439', 'pm_score': 2, 'selected': False, 'text': '<p>In <a href="http://www.dotnetrocks.com/default.aspx?ShowNum=315" rel="nofollow noreferrer">DotNetRocks episode 315</a>, Brian Noyes discusses this extensively.</p>\n'}, {'answer_id': 609979, 'author': 'Mark', 'author_id': 64084, 'author_profile': 'https://Stackoverflow.com/users/64084', 'pm_score': 7, 'selected': False, 'text': '<p>After three months of trying to hammer out a <a href="http://en.wikipedia.org/wiki/Line_of_business" rel="noreferrer">line-of-business</a> (LOB) application on WPF, I reached a point of considering turning back to Windows Forms for my project, and in researching other people\'s opinions, came across this thread...</p>\n\n<p>Yes, WPF is a brilliant technology and it has benefits that span far beyond mere eye-candy... the templating and binding capabilities are great examples. The whole object model offers more flexibility and broader possibilities. That doesn\'t, however, make it the defacto platform for future LOB applications.</p>\n\n<p>The "problems" which WPF solves in terms of separating GUI from business logic aren\'t problems which can\'t be readily solved in Windows Forms by simply starting with the right architecture and mind-set. Even the object-path binding capabilities of WPF can be reproduced in Windows Forms with some very simple helper classes. The data template capabilities of WPF are very nice, but again they\'re nothing that you can\'t simulate in Windows Forms on those rare occasions when you absolutely don\'t know exactly what objects you\'re going to represent on any given part of the screen.</p>\n\n<p>Where Windows Forms races ahead is in terms of maturity. You can\'t swing a dead cat on Google without hitting some blog where someone has solved a Windows Forms problem for you. WPF, on the other hand, has comparatively less learning resources available, fewer custom controls available, and hasn\'t had as many of its teething problems solved.</p>\n\n<p>At the peak of making a WPF vs Windows Forms decision has got to be the maturity of the development environment. Windows Forms editors are slick, responsive and intuitive. Feedback about errors gets to you instantly, the solutions are usually obvious, and the compile->debug->edit cycle in Windows Forms is very quick.</p>\n\n<p>WPF applications, on the other hand, have comparatively pathetic design time support, with the design view all-too ready to chicken out at the first encounter of an error, often requiring a project build after the fix before the designer is willing to kick in again. Drag\'n\'drop of components from the toolbox might as well not be supported, given the vast range of circumstances under which it either doesn\'t work at all, or yields completely unintuitive results. Despite the promise of the WpfToolkit, there still isn\'t a usable DataGrid for WPF that yields any kind of resonable performance or design time friendliness. </p>\n\n<p>Debugging WPF applications is a bit like the <em>old</em> ASP.NET debugging paradigm... hit <kbd>F5</kbd> -> wait -> launch -> error -> stop -> fix -> hit <kbd>F5</kbd> -> wait -> launch -> error -> groan -> stop -> fix -> hit <kbd>F5</kbd>....  All XAML which your program is running is locked, and tracking down XAML specific problems is often tedious.</p>\n\n<p>The bottom line, simply put, is that the development tools for Windows Forms are going to have you banging out front-ends in a fraction of the time of a WPF application... <em>especially</em> if you\'re creating master-detail grids or spreadsheet like interfaces, which most LOB have. With Windows Forms, you start with 90% of the work already done for you.</p>\n\n<p>I\'m a huge fan of the WPF architecture. I just wish the design-time tool-set didn\'t feel like a pre-alpha debug-build.</p>\n\n<hr>\n\n<p>Edit: This answer was posted about .NET 3.5 + Visual&nbsp;Studio&nbsp;2008, but .NET 4.0 with Visual Studio 2010 ships with a WPF data grid. While many improvements have been made to the new WPF development experience, my answer here remains unchanged, and I\'d like to add the following suggestion:</p>\n\n<p>If you\'re in a rush to do <a href="http://en.wikipedia.org/wiki/Rapid_application_development" rel="noreferrer">RAD</a> development, go with Windows Forms. If you\'re looking to produce a well architected, maintainable, scalable, resource firendly, multi-user Line-Of-Business application, consider ASP.NET MVC + HTML 5 + jQuery... My projects with these technologies have resulted in better outcomes, sooner, for my customers. MVC offers all of the same templating that WPF does, and jQuery enables animations and complex interactions. More importantly, an ASP.NET MVC + jQuery solution doesn\'t require your end users to have modern desktops with decent graphics hardware.</p>\n'}, {'answer_id': 625216, 'author': 'Mark', 'author_id': 64084, 'author_profile': 'https://Stackoverflow.com/users/64084', 'pm_score': 5, 'selected': False, 'text': '<p>The programming model for WPF is more open and flexible than Windows Forms is, but like ASP.NET MVC, it requires a little more discipline in terms of correctly implementing Model-View-ViewModel patterns. </p>\n\n<p>My first <a href="http://en.wikipedia.org/wiki/Line_of_business" rel="nofollow noreferrer">LOB</a> application with WPF ended up as an utter failuire, because it was a resource hog which brought my end-user\'s very-low-end laptops grinding to a halt... and this was ultimately because I just lept in with WPF + <a href="http://en.wikipedia.org/wiki/Language_Integrated_Query#LINQ_to_SQL" rel="nofollow noreferrer">LINQ&nbsp;to&nbsp;SQL</a> and expected a good result... and this is where WPF diverges so strongly from Windows Forms... In Windows Forms, you can get away with that sort of thing. WPF is much heavier on resources than Windows Forms, and if you don\'t architect your application to be lean, you end up with a 800-pound gorilla.</p>\n\n<p>Don\'t shy away from WPF... explore it. But be aware that the acceptable sins of Windows Forms coding won\'t produce good results in WPF. They\'re fundamentally different engines, which lend themselves to fundamentally different coding patterns. </p>\n\n<p>Last Word:  If you do go ahead with WPF, get well acquianted with data virtualization for use with lists and grids. What is a simple data-bound ListItem or GridCell ends up being a hefty logical + visual object-graph in WPF, and if you don\'t learn how to virtualize, you application won\'t perform well on large data sets. </p>\n'}, {'answer_id': 885364, 'author': 'Steve Wortham', 'author_id': 102896, 'author_profile': 'https://Stackoverflow.com/users/102896', 'pm_score': 4, 'selected': False, 'text': '<p>Aside from the flexibility in UI design, there are some technical advantages to WPF:</p>\n\n<p><strong>1.) WPF doesn\'t rely on GDI objects.</strong>  Well, I think it uses 2 GDI objects for the instance of the window itself, but that\'s practically nothing.  I\'ve been involved to a certain extent in a very large internal Windows Forms application.  The people in our office sometimes run 3 or 4 instances of it simultaneously.  The problem is that they frequently run into the 10,000 GDI object limit inherent to Windows 2000, XP and Vista.  When that happens the entire OS becomes unresponsive and you\'ll start to see visual artifacts. The only way to clear it up is to close applications down.</p>\n\n<p><strong>2.) WPF utilizes the GPU.</strong>  The ability for WPF to off-load some of the UI processing to the GPU is brilliant.  I only expect this aspect of it to get better with time.  As a former OpenGL programming hobbyist I can appreciate the power that comes from the GPU.  I mean, my $100 video card has 112 cores running at 1.5 GHz each (and that\'s not top of the line by any means).  That kind of parallel processing power can put any quad-core CPU to shame.</p>\n\n<p>However, WPF is still pretty new.  It won\'t run on Windows 2000.  And in fact, a WPF application can be slow to start up after a fresh reboot.  I talk about all of this on my blog:\n<a href="http://blog.bucketsoft.com/2009/05/wpf-is-like-fat-super-hero.html" rel="nofollow noreferrer">http://blog.bucketsoft.com/2009/05/wpf-is-like-fat-super-hero.html</a></p>\n'}, {'answer_id': 1087148, 'author': 'Mark', 'author_id': 64084, 'author_profile': 'https://Stackoverflow.com/users/64084', 'pm_score': 6, 'selected': False, 'text': '<p>I\'m seven months into using WPF on what has now become a core system for my customer, and I\'d like to share some more thoughts with you about the experience of learning and using WPF as a line of business presentation platform.</p>\n\n<p>In general, the comments I made above still hold... The design time support for WPF isn\'t here yet. If you\'re in a big rush to get a rich-client application out of the door, go with Windows Forms. Period. Microsoft aren\'t in any hurry to discontinue the GDI / Windows Forms platform, so you can count on good support for a fair time into the future.</p>\n\n<p><strong>WPF is not easy to master</strong>, but that shouldn\'t be where you leave your descision about whether or not to invest your time and energy into learning WPF. Despite its present lack of maturity, WPF is built around some useful, modern concepts. </p>\n\n<p>In WPF, for example, your investment in well-written business objects with sound validating logic is a solid investment. Unlike Windows Forms, WPF\'s data binding is briming with features that allow interface controls to react to invalid user input <em>without writing GUI code</em> to detect those errors. This is valuable.</p>\n\n<p>The styling and templating capabilities in WPF have proven to be valuable too. Despite the common misconception that the only use for styling and templating is to create on-screen eye-candy, the truth is that these features significantly simplify the coding of a user interface which gives rich feedback - like buttons that disable/enable themselves base on the state of the underlying business logic layer, or tooltips which intelligently find their text based on the state of the object under the cursor, etc. </p>\n\n<p>These all add up to incredibly valuable features for "nothing fancy" <em>business applications</em>, simply because they make it easy to keep the interface congruent with the underlying data.</p>\n\n<p>In a nutshell: </p>\n\n<ul>\n<li>In Windows Forms you design your user\ninterface, then write code to drive\nthat user interface, which generally\nalso includes code to drive your\ndata objects.</li>\n<li>In WPF you invest in the business layer that drives your data objects, then design an interface that <em>listens</em> to your data objects.</li>\n</ul>\n\n<p>It\'s a seemingly subtle difference, but it makes a huge difference in your ability to re-use code... which begs the question: "Is the Windows Forms vs WPF question actually an investment decision?"</p>\n\n<p>(This seems to have become my favourite thread.)</p>\n'}, {'answer_id': 1693774, 'author': 'Ray Burns', 'author_id': 199245, 'author_profile': 'https://Stackoverflow.com/users/199245', 'pm_score': 6, 'selected': False, 'text': '<p><strong>Are there any compelling reasons to use WPF</strong></p>\n\n<p>Absolutely! WPF is absolutely incredible! It will be a major benefit for practically any project because it has so many features and abilities that Windows Forms lacks.</p>\n\n<p>For business applications the biggest wins will be:</p>\n\n<ul>\n<li>The fantastic data binding and templating make the biggest difference. Once a decent data model is in place, it only takes a few clicks to create a data template and use <a href="http://en.wikipedia.org/wiki/Microsoft_Expression_Blend" rel="nofollow noreferrer">Expression Blend</a> to configure exactly how your object will look using drag-and-drop. And binding to things like color or shape is trivial.</li>\n<li>Screen layout is incredibly flexible. Not only can everything in WPF smoothly adjust to container size and shape changes, but items can trivially be enlarged and rotated, and even extend outside their containing frame.</li>\n<li>Ordinary objects can be presented any way you like, can easily have different presentations in different screens, can share presentation, and can adapt their presentation to changes in data values.</li>\n<li>If you need to print, rendering to the printer is trivial. Properly configured, WPF makes <a href="http://en.wikipedia.org/wiki/Crystal_Reports" rel="nofollow noreferrer">Crystal Reports</a> or <a href="http://en.wikipedia.org/wiki/SQL_Server_Reporting_Services" rel="nofollow noreferrer">SQL Server Reporting Services</a> (SSRS) look like a child\'s toy.</li>\n<li>Your user interface will look and feel much more dynamic, including nice features such as buttons that animate when you pass the mouse over them.</li>\n</ul>\n\n<p>For utilities and games, other advantages come to the forefront:</p>\n\n<ul>\n<li>You can easily add shapes, lines, and arbitrary drawings to your application without using an external editor. Every component of these can be data-bound and animated, or controlled by code. In Windows Forms you ususally just have to import a bitmap and use it as-is unless you want to go to a lot of work.,</li>\n<li>Animations are cool! Users will be really impressed, as long as you don\'t overdo it. They can also help people see what is going on and reduce the need for hilighting. For example, when dragging an object you can animate the target to show what will happen if you drop it.</li>\n<li>Colors, gradient fills, brushes, fancy fonts, rotation of any objects, tile brushes, etc. Anything you want graphically is yours for the asking.</li>\n<li>Incredibly customizable. I needed to draw railroad tracks for one application, so I could drop a train on them. A couple of hours later I had railroad tracks I could draw anywhere on the screen using <a href="http://en.wikipedia.org/wiki/B%C3%A9zier_curve" rel="nofollow noreferrer">Bézier curves</a>, and they would join and switch automatically.</li>\n</ul>\n\n<p>The bottom line is that any significant-size GUI you could build in Windows Forms can be built in WPF in a third of the effort (or less) and look way, way better.</p>\n\n<p><strong>Does WPF require more resources (RAM in particular)</strong></p>\n\n<p>You do pay a price compared to Windows Forms, but it is a small one.</p>\n\n<ul>\n<li>RAM can go up or down depending on your implementation. WPF stores its data more efficiently so individual objects are smaller, but there tend to be more objects in WPF than in Windows Forms so this balances out, and either one can come out ahead.</li>\n<li>CPU will go up compared to Windows Forms. In my experience, the actual update of WPF objects onscreen takes about twice as much CPU as normal Windows Forms rendering. If your application spends most of its time updating the screen, WPF may not be for you. But in that case you\'re probably not using Windows Forms either: Most serious games are written directly to <a href="http://en.wikipedia.org/wiki/DirectX" rel="nofollow noreferrer">DirectX</a>.</li>\n<li>Disk usage will be slightly less for WPF because it takes so much less code than Windows Forms. The data will be the same size, of course.</li>\n</ul>\n\n<p>One more note about CPU use: Animations and transforms (motion, translation, etc.) is actually more efficient on WPF than in Windows Forms because of its retained mode storage. It is the initial getting of the objects up there that is slower.</p>\n\n<p><strong>Maintenance overhead</strong></p>\n\n<p>WPF is a <strong>huge</strong> win over Windows Forms when it comes to maintenance. Since everything is done in 1/5 as much code as before, there is 1/5 as much to maintain. Plus all the boilerplate stuff is gone so you can focus on the code that actually does the work.</p>\n\n<p><strong>Benefits of XAML</strong></p>\n\n<p><a href="http://en.wikipedia.org/wiki/Extensible_Application_Markup_Language" rel="nofollow noreferrer">XAML</a> is the core of WPF. Although WPF can be used without XAML, XAML makes it incredibly easy to use. XAML has HTML\'s ability to easily specify a user interface, but its built-in tags are much more powerful, and you can easily define your own. (In fact, it is normal to do so).</p>\n\n<p>Some specific advantages of XAML:</p>\n\n<ul>\n<li>Your entire UI is defined in a text file that is easy to read and manipulate, both for users and tools</li>\n<li>MarkupExtensions allow Bindings to be specified in a clear and simple way</li>\n<li>Type converters allow properties with complex types to be easily specified. For example, you can say Brush="Green" or you can specify a radial gradient brush with three stops.</li>\n<li>You can create your own elements</li>\n<li>You can easily leverage WPF\'s powerful "attached properties"</li>\n</ul>\n\n<p><strong>Other insights</strong></p>\n\n<p>I dreamed of something like WPF for many years. Many people have implemented portions of this functionality, but to get it all in one place and at such a price ($0) is amazing.</p>\n\n<p>WPF is a huge paradigm shift from Windows Forms and will take some getting used to, but the time spend learning it will pay itself back many-fold.</p>\n\n<p>WPF still has a few warts even five years later, but its power will totally blow you away once you experience it. If someone tries to drag you back to Windows Forms, you\'ll only go kicking and screaming.</p>\n\n<p>Tips:\n - Do get a copy of Expression Blend for development\n - Do edit XAML by hand occasionally\n - Don\'t give up when it seems strange at first</p>\n'}, {'answer_id': 1763840, 'author': 'DeveloperAlex', 'author_id': 214648, 'author_profile': 'https://Stackoverflow.com/users/214648', 'pm_score': 2, 'selected': False, 'text': "<p>For the last 3 1/2 years I've been doing Windows Forms development (at two companies). Both applications were used extensively and ended up having GDI problems. Large Windows Forms applications will eventually run out of GDI resources - causing the end user to have to reboot.</p>\n"}, {'answer_id': 1800398, 'author': 'user218981', 'author_id': 218981, 'author_profile': 'https://Stackoverflow.com/users/218981', 'pm_score': 2, 'selected': False, 'text': '<p>A quote from <a href="https://stackoverflow.com/questions/57909/when-creating-a-new-gui-is-wpf-the-preferred-choice-over-windows-forms/1087148#1087148">an earlier post from Mark</a>:</p>\n\n<blockquote>\n  <ul>\n  <li>In Windows Forms you design your user interface, then write code to drive that user interface, which generally also includes code to drive your data objects.</li>\n  <li>In WPF you invest in the business layer that drives your data objects, then design an interface that listens to your data objects.</li>\n  </ul>\n</blockquote>\n\n<p>I would argue that this is more of a design choice, rather than whether or not you are using Windows Forms or WPF. However, I can appreciate that certain technologies might be better suited for a particular approach.</p>\n'}, {'answer_id': 1950221, 'author': 'Icabod', 'author_id': 237302, 'author_profile': 'https://Stackoverflow.com/users/237302', 'pm_score': 2, 'selected': False, 'text': '<p>There is a known issue with text rendering in WPF.  Many users report that the heavy use of anti-aliasing and pixel-blending used causes blurry text.  This is a big deal breaker in some circumstances and, as far as I know, has been acknowledged by Microsoft at some level.</p>\n'}, {'answer_id': 3013195, 'author': 'akjoshi', 'author_id': 45382, 'author_profile': 'https://Stackoverflow.com/users/45382', 'pm_score': 1, 'selected': False, 'text': "<p>Only if you don't have WPF expertise and you don't want to invest in it :)</p>\n"}, {'answer_id': 3279582, 'author': 'Turing Complete', 'author_id': 372920, 'author_profile': 'https://Stackoverflow.com/users/372920', 'pm_score': 0, 'selected': False, 'text': '<p>I\'d use Winforms for quick proof of concept stuff, because, while it\'s terrible for real applications, it is very good for "Visual Basic 6.0" - style rapid prototyping.</p>\n\n<p>So, here an example:</p>\n\n<p>If I need to trace through multiple steps of a process (like downloading something, calculating / converting, creating intelligent ouput) and making everything reproducible, I usually make a quick Form, with a ListBox and a few buttons, done.</p>\n\n<p>Since I\'m a REAL developer, the logic will already be in classes other than the view anyway, so this is a fine place to start.</p>\n'}, {'answer_id': 7306516, 'author': 'Gurpreet Singh', 'author_id': 182406, 'author_profile': 'https://Stackoverflow.com/users/182406', 'pm_score': 0, 'selected': False, 'text': '<p>Using WPF provides you with the means to customize your application to a great extent. You can code very quickly, that is, create a customize control like a textbox within seconds and customize various attributes like content style, etc., and the best part is the UI beauty, that is, animations, triggers, etc., graphics. But it requires good hardware specifications and some special features available only in Windows&nbsp;Vista and Windows&nbsp;7.</p>\n\n<p>Windows Forms does not have these rich features which really count, otherwise we can create any type of application using it which we can in WPF.</p>\n\n<p>Windows Forms and WPF are a different species all together, it all depends on the project requirements, that is, what the client or user wants. </p>\n'}]
['https://Stackoverflow.com/questions/57909', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/5703/']