Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What are the bigger hurdles to overcome migrating from Winforms to WPF?

I've been developing Winforms applications in C# for a few years now and have been interested in moving future development toward WPF, mainly because of the positive things I've been hearing about it. But, I'm wondering what sort of hurdles others have had to overcome as they migrated to WPF. Was there a significant hit to your productivity or any particular issues which you found challenging?

like image 233
itsmatt Avatar asked Sep 20 '08 22:09

itsmatt


People also ask

What is replacing WPF?

Universal Windows Platform. Both Windows Forms and WPF are old, and Microsoft is pointing developers towards its Universal Windows Platform (UWP) instead. UWP is an evolution of the new application platform introduced in Windows 8 in 2012.

Does Winforms use XAML?

It is based on DirectX with XAML support. It provides access to the native windows library of common controls. It uses markup language for designing UI allowing the design of complex user interfaces.


2 Answers

I'm not sure I can give you just one hurdle, because it is a complete departure from WinForms. My suggestion is get Adam Nathan's WPF Unleashed, forget everything you know about building UI's with any previous technology (Winforms, MFC, Java) and begin again at square one.

If you try and do it any other way it will cause utter frustration.

ETA: the reason I say to just start from scratch is because sometimes it's easier to learn new concepts if you go in with a clean slate. In the past, I've discovered that I can be my own worst enemy when it comes to learning something new if I try to carry knowledge from technology to technology (e.g. thinking that doing asmx web services for years precludes me from reading the first couple chapters of a WCF book).

like image 122
Don Avatar answered Nov 07 '22 08:11

Don


In my admittedly limited experience with WPF, the bigger hurdles include a complete overhaul of my mental model for how UIs are built and the new terminology that needs to be learned as a result of that. It may be that others have an easier time adjusting to the model, though. I can see how someone coming from best practices in the web world would find the transition much more natural.

There was definitely a significant hit to my productivity (so significant that I'm not yet comfortable with the idea of going to my employer and saying "let me do this with WPF instead of Winforms"). I don't think that I'll never get there, but I need to develop some additional comfort with the technology through practice in my personal time.

I didn't run into any particular issues that I found to be more challenging than any others. I believe Adam Nathan's WPF Unleashed was mentioned elsewhere, and that's definitely a worthwhile read. I've also heard good things about Charles Petzold's book, though I can't personally vouch for it.

like image 39
Greg D Avatar answered Nov 07 '22 09:11

Greg D