4 ms·
From the Windows/Client UI side, I think you may want to check out WPF. Winforms is exactly what you said, a thin Win32 wrapper in .Net (which is why I found i
by dbattaglia 14y ago
From the Windows/Client UI side, I think you may want to check out WPF. Winforms is exactly what you said, a thin Win32 wrapper in .Net (which is why I found it easy, already knowing some C Win32 APIs and MFC). WPF takes some times to wrap your head around, I still haven't done it, but it seems like a better way to go.
Of course now we have Windows 8/WinRT so who knows what's going to happen to WPF.
- eogas 14y agoWPF is definitely the way to go. I started a modest sized project a few years ago at an internship, and this past summer I was allowed the task to move it from Forms to WPF. Let me tell you, working with WPF is so much better. Especially when you get into anything custom. Custom drawing in Forms is always a hack, and you basically have to do it in code. WPF is essentially designed to make creating custom controls with custom drawing incredibly easy. Not to mention all the awesome databinding stuff, and now with async in C# 5, it's easier than ever to create responsive UI. Just reading about the async stuff had me thinking back to that project, saying "yeah, that would make [some chunk of the code] a lot more intelligible". I contribute a lot in the /r/learnprogramming subreddit, and when new programmers are asking about UI with C#, I generally suggest just skipping Forms. There's really no reason to use it anymore. I can't believe I used it so long while WPF was right there, ready to free me of the Forms peril.
- TheMakeA 14y agoDefinitely this. Use WPF if you can. I don't recommend trying to use WPF "as is", but suggest reading about the MVVM pattern and the available frameworks, particularly Caliburn.Micro and ReactiveUI.
- pixie_ 14y agoWPF does take time to wrap your head around because it's more complicated, and in a lot of cases writing business apps (which most straight windows apps are) there is no need for all the 'power' WPF provides. WinForms is easy to develop using just the GUI designer. WPF you often need to mix your development between the form designiner and the XAML code itself. It's a needless headache. Also WinForms GUI designer translated the design into straight C#. The WPF->XAML->C# conversion isn't readily accessible, or editable by the programmer and is the source of a lot of complexity and confusion. Often typos in XAML can bring a whole application crashing down with not much of a clue to the source of the bug. /rant
- dbattaglia 14y agoThe xaml/designer issue is pretty much what stopped me from diving too far into wpf. Usually if I'm doing Wimdows apps these days it's some utility/internal tool for work, and it's just sooo much quicker for me to whip something up in winforms ( with a nice easy click once deploy). But for something customer facing I would definitely spend the time to learn wpf. I believe the Github GUI app is WPF and that has a pretty cool interface that would be tricky to pull off in winforms (on a side note, I felt really cheesy at first using it over the command line but now I'm hooked).