I was working with Windows Forms for a while now, and due to certain limitations on Forms, I want to work my way up to a better way of making GUIs. I found WPF, which looks pretty promising, but I'm asking you guys, if there are any better ways for doing nice GUIs for Windows with C#? Thanks in advance!
-
1Linking to an article (even though four year old, I'd say it still holds): http://stackoverflow.com/questions/9752375/which-windows-gui-frameworks-are-currently-worth-learning – Kamil Solecki May 14 '16 at 09:21
-
I've found WPF to be enormously better than winforms, but it was a hell of a learning curve for the first year or two. It's a different way of thinking about things. Data binding with templating makes it possible to slap together clean, maintainable UI real quick. – 15ee8f99-57ff-4f92-890c-b56153 May 14 '16 at 10:54
2 Answers
I would look for MS roadmaps and instructions where they plan to drive the platform. For example: .NET Technology Guide for Business Applications
This is since nov 2013 but still valid to a large degree. Among other things it states that (emphasis mine):
.NET Windows Presentation Foundation
This is the preferred technology for Windows-based desktop applications that require UI complexity, styles customization, and graphics-intensive scenarios for the desktop. WPF also takes advantage of XAML views. And WPF development skills are similar to Windows Store development skills, so migration from WPF to Windows Store apps is easier than migration from Windows Forms.
HTML5&JS-based apps is an alternate route but I consider it inferior for development efficiency and maintainability reasons. If you are a scripting fella, then it's worth a look.
By my experience WPF is definitely the way to go for desktop development.

- 4,468
- 1
- 34
- 49
-
2HTML and JS are a joke compared to WPF... IF you need it. I use charts that use Direct3d for rendering fast, I write apps that open multiple screens. HTML and JS can not do any of that - they are for the simplistic stuff. – TomTom May 14 '16 at 10:43
There is definitely a learning curve migrating from Forms development to WPF, but in my opinion the effort is well worth it, and not simply because WPF is aesthetically different to Windows Forms.
WPF encourages you along the MVVM ("Model-View-View model") path and a separation of concerns between UI, logic and data elements. As an aside, MVVM is one of a number of MV* architectural patterns - there's some debate about what constitutes the difference between the different patterns, but consensus that separation of concerns is absolutely a good thing. For example:
https://nirajrules.wordpress.com/2009/07/18/mvc-vs-mvp-vs-mvvm/
What is difference between MVC, MVP & MVVM design pattern in terms of coding c#
In terms of specific advantages over Forms, there's a lot of stuff you get out-of-the-box with WPF, like two-way data-binding and UI threading for instance. But I found that the change in thinking about problems is equally valuable; when I started thinking in MVVM, things like asynchronous programming (e.g. calling web services from windows-based client applications) just became much easier to conceptualise and reason about.
MV* is all the rage in web development, too, so the skills (and, in an ideal world, some of the code) are transferable to the web.