Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Winforms vs. WPF
Message
From
04/01/2019 12:32:21
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
To
04/01/2019 12:18:51
General information
Forum:
C#
Category:
Forms
Miscellaneous
Thread ID:
01664814
Message ID:
01665133
Views:
69
Since you are just starting this, and anyways would have learning curve, I would suggest you to at least spare a few days in exploring non-MS tech too. WPF is nice but not easy to work with especially in binding. If you have a possibility to go outside windows platform, then probably it is better to learn other non-MS tech.
< set blame ON > Go or Python, with Qt and postgreSQL for example - have a check at DaboDev.com for example, I don't use it myself but it is from old VFP developers and non-MS < set blame OFF >


>Hi Rick,
>
>Thanks for the excellent response. As with all the other thread responses here, I have summarized them into a document - yours is not easy to summarize! My takeaway is that WinForms is probably easier to start with but WPF has more options for complex controls - but both are not being enhanced much by MSFT. And it is harder to learn WPF especially for the data binding. Overall though, probably better to start with WPF and chug through the learning curve as better tool overall...
>
>Albert
>
>>Microsoft has a shitty story for building desktop apps because they have lots of choices, but don't stand strongly behind any one of them. Both WinForms and WPF are effectively on life support, but they are nevertheless solid solutions that get regular bug fixes and small enhancements in each .NET release. They're not dead but just neglected. Microsoft is pushing UWP (Windows Store) apps, but there's been very little interest from developers mainly because there are severe limitations on what you can do with them and because they effectively have to be loaded through the Windows Store or some complex side loading scheme. Plus getting apps approved for the store is a royal pain.
>>
>>
>>WinForms is probably the closest to FoxPro with your typical drag and drop controls on a Canvas (x/y position) based layout. WPF and UWP both use XAML which is XML based layout that is more declarative and flow based and more similar to HTML although much more flexible.
>>
>>WinForms is easier for simple forms based applications, but WPF is much more flexible in what you can do with the UI. It's easy to build complex UI lists and custom layouts without having to resort to third party controls. There are also several good third party apps that can help with getting good theming to get a nice looking application without too much effort. I use MahApps for most of my WPF apps and it provides nice modern looking aplications out of the box with minimal effort.
>>
>>That said WPF (and also UWP) tends to be a bit of bear to learn because it's very different and the syntax - especially the databinding - can be hard to get your head around and remember. But it's very powerful and can help reduce a ton of code you normally have to write to make sure data on screen is kept in sync.
>>
>>I used to joke that WPF makes the hard things easy and the easy things hard - and to this day I think there's a lot of truth to that. Still I tend to use WPF as my go to solution because it's the most powerful of all the tools and it allows for doing custom things relatively easily. For WinForms the same sort of stuff usually requires custom controls or a lot of time creating custom GDI customization stuff that no one has time for. But then again if you come from a FoxPro expectation WinForms is a much richer environment than FoxPro UI to begin with.
>>
>>UWP is Microsoft Store software which honestly if you're building desktop apps you should just skip. If you're building a UWP app which has limitations similar to Web applications in terms of security access to the local machine, you should always ask yourself why not build a Web app instead... WPF and WinForms don't have a sandbox and have full access to the local machine which is pretty much the only reason you should be writing a desktop app these days - otherwise Web apps almost always make more sense.
>>
>>Personally if I have to build a desktop app I tend to use WPF. I usually use MahApps which provides the base UI layer that looks nice and I have the ability to build custom functionality with relative ease when I need to. The flexibility is a big plus and usually comes in handy for anything that really requires a desktop app in the first place.
>>
>>Lots of choices, none of them perfect, but choices are at least available...
>>
>>+++ Rick ---
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform