Winforms or WPF
-
Starting a new desktop application, I wonder whether I should stick with WinForms or try to learn WPF. On the one hand, the application is quite simple, GUI-wise, and has no need for any blending or animation or other 'cool' things. It's a form-based application, of the classic type that's been a Windows staple for 20 years. On the other hand, I've seen claims that WPF is the future. Mind you, Win7 is only now being picked up, and Win8 still supports old desktop applications. Learning WPF as a gateway to Silverlight seems a bit pointless now that SL seems to have been dropped. It's also unlikely I'd try to migrate this app to the cloud - if I did, I'd probably re-write it in PHP or Python. So that leaves WinRT. Is that the only reason for jumping to WPF? (I should probably note that this is a hobby project - in my day job I'm a C++ developer, which I'm happy with, so I'm not interested in learning WPF to "further my career". I tend to write GUI-based applications in C#/Winforms though, as MFC is a dog.) Grateful for reasoned advice.
-
Starting a new desktop application, I wonder whether I should stick with WinForms or try to learn WPF. On the one hand, the application is quite simple, GUI-wise, and has no need for any blending or animation or other 'cool' things. It's a form-based application, of the classic type that's been a Windows staple for 20 years. On the other hand, I've seen claims that WPF is the future. Mind you, Win7 is only now being picked up, and Win8 still supports old desktop applications. Learning WPF as a gateway to Silverlight seems a bit pointless now that SL seems to have been dropped. It's also unlikely I'd try to migrate this app to the cloud - if I did, I'd probably re-write it in PHP or Python. So that leaves WinRT. Is that the only reason for jumping to WPF? (I should probably note that this is a hobby project - in my day job I'm a C++ developer, which I'm happy with, so I'm not interested in learning WPF to "further my career". I tend to write GUI-based applications in C#/Winforms though, as MFC is a dog.) Grateful for reasoned advice.
Unless you want to learn WPF for some other reason, if you already know WinForms, it seems like it will do the job you want fairly straightforwardly so I would just use that. WPF lets you do lots of cool stuff but if you don't need any of that then it doesn't add all that much (data binding is a lot better but that can be worked around).
Orjan Westin wrote:
On the other hand, I've seen claims that WPF is the future.
Other things that have been 'the future' include SVG, Silverlight and applications in the cloud.
-
Starting a new desktop application, I wonder whether I should stick with WinForms or try to learn WPF. On the one hand, the application is quite simple, GUI-wise, and has no need for any blending or animation or other 'cool' things. It's a form-based application, of the classic type that's been a Windows staple for 20 years. On the other hand, I've seen claims that WPF is the future. Mind you, Win7 is only now being picked up, and Win8 still supports old desktop applications. Learning WPF as a gateway to Silverlight seems a bit pointless now that SL seems to have been dropped. It's also unlikely I'd try to migrate this app to the cloud - if I did, I'd probably re-write it in PHP or Python. So that leaves WinRT. Is that the only reason for jumping to WPF? (I should probably note that this is a hobby project - in my day job I'm a C++ developer, which I'm happy with, so I'm not interested in learning WPF to "further my career". I tend to write GUI-based applications in C#/Winforms though, as MFC is a dog.) Grateful for reasoned advice.
The answer really depends on whether or not you see yourself moving towards writing Windows Store style applications (possibly the crappest name for a tech stack ever). If you are happy writing desktop applications and will continue only writing desktop applications then WinForms is a fine choice. If you see yourself wanting to write TTSFKAM (The Technology Stack Formerly Known As Metro) then knowing WPF will certainly help.
*pre-emptive celebratory nipple tassle jiggle* - Sean Ewington
"Mind bleach! Send me mind bleach!" - Nagy Vilmos
CodeStash - Online Snippet Management | My blog | MoXAML PowerToys | Mole 2010 - debugging made easier
-
Starting a new desktop application, I wonder whether I should stick with WinForms or try to learn WPF. On the one hand, the application is quite simple, GUI-wise, and has no need for any blending or animation or other 'cool' things. It's a form-based application, of the classic type that's been a Windows staple for 20 years. On the other hand, I've seen claims that WPF is the future. Mind you, Win7 is only now being picked up, and Win8 still supports old desktop applications. Learning WPF as a gateway to Silverlight seems a bit pointless now that SL seems to have been dropped. It's also unlikely I'd try to migrate this app to the cloud - if I did, I'd probably re-write it in PHP or Python. So that leaves WinRT. Is that the only reason for jumping to WPF? (I should probably note that this is a hobby project - in my day job I'm a C++ developer, which I'm happy with, so I'm not interested in learning WPF to "further my career". I tend to write GUI-based applications in C#/Winforms though, as MFC is a dog.) Grateful for reasoned advice.
Orjan Westin wrote:
On the other hand, I've seen claims that WPF is the future.
Microsoft stated that WPF is not a replacement-technology for WinForms. Contrary to the claims, it is not a dead technology. VB6 is, and even that still runs on Win8. Somehow I don't think you have to worry much on the platform going away :)
Orjan Westin wrote:
So that leaves WinRT. Is that the only reason for jumping to WPF?
From what I heard, WPF does a nice job on decoupling the form from the code. A nice comparison can be found here[^].
Bastard Programmer from Hell :suss: if you can't read my code, try converting it here[^]
-
Starting a new desktop application, I wonder whether I should stick with WinForms or try to learn WPF. On the one hand, the application is quite simple, GUI-wise, and has no need for any blending or animation or other 'cool' things. It's a form-based application, of the classic type that's been a Windows staple for 20 years. On the other hand, I've seen claims that WPF is the future. Mind you, Win7 is only now being picked up, and Win8 still supports old desktop applications. Learning WPF as a gateway to Silverlight seems a bit pointless now that SL seems to have been dropped. It's also unlikely I'd try to migrate this app to the cloud - if I did, I'd probably re-write it in PHP or Python. So that leaves WinRT. Is that the only reason for jumping to WPF? (I should probably note that this is a hobby project - in my day job I'm a C++ developer, which I'm happy with, so I'm not interested in learning WPF to "further my career". I tend to write GUI-based applications in C#/Winforms though, as MFC is a dog.) Grateful for reasoned advice.
WPF is quite different from winforms, more resembling a sort of web page than a form from a developing point of view (XAML). That said, if you want to learn WPF, start with a book and a simple form, if you dive in because you need to animate things or do complex stuff it might blow up in your face. IOW if you want to dive in WPF, this is not a bad project to do so, but winforms will work equally well in this case.
-
Starting a new desktop application, I wonder whether I should stick with WinForms or try to learn WPF. On the one hand, the application is quite simple, GUI-wise, and has no need for any blending or animation or other 'cool' things. It's a form-based application, of the classic type that's been a Windows staple for 20 years. On the other hand, I've seen claims that WPF is the future. Mind you, Win7 is only now being picked up, and Win8 still supports old desktop applications. Learning WPF as a gateway to Silverlight seems a bit pointless now that SL seems to have been dropped. It's also unlikely I'd try to migrate this app to the cloud - if I did, I'd probably re-write it in PHP or Python. So that leaves WinRT. Is that the only reason for jumping to WPF? (I should probably note that this is a hobby project - in my day job I'm a C++ developer, which I'm happy with, so I'm not interested in learning WPF to "further my career". I tend to write GUI-based applications in C#/Winforms though, as MFC is a dog.) Grateful for reasoned advice.
In your case, if it isn't critical (or this is for your employer and they're unahppy about supporting a different bit'o'the'framework) I'd go for WPF, just out of interest. I managed to architect a pretty large banking app that had about 10 lines of code runing behine the UI, most of which was exception handling stuff. If you do use WPF, see how it is used with MVVM.
Sort of a cross between Lawrence of Arabia and Dilbert.[^]
-Or-
A Dead ringer for Kate Winslett[^] -
Starting a new desktop application, I wonder whether I should stick with WinForms or try to learn WPF. On the one hand, the application is quite simple, GUI-wise, and has no need for any blending or animation or other 'cool' things. It's a form-based application, of the classic type that's been a Windows staple for 20 years. On the other hand, I've seen claims that WPF is the future. Mind you, Win7 is only now being picked up, and Win8 still supports old desktop applications. Learning WPF as a gateway to Silverlight seems a bit pointless now that SL seems to have been dropped. It's also unlikely I'd try to migrate this app to the cloud - if I did, I'd probably re-write it in PHP or Python. So that leaves WinRT. Is that the only reason for jumping to WPF? (I should probably note that this is a hobby project - in my day job I'm a C++ developer, which I'm happy with, so I'm not interested in learning WPF to "further my career". I tend to write GUI-based applications in C#/Winforms though, as MFC is a dog.) Grateful for reasoned advice.
I've done a lot of WinForms development; but once I started using WPF, I though WinForms was a "dog" ... all that dragging and dropping and positioning. With WPF, I work almost exclusively in XAML and never in the "designer". With WPF, you can easily "flow" and scale controls, and never worry about absolute positioning. While WinForms has one or more "layout" controls that help with positioning controls, WPF has much better support; so much so, I enjoy creating UI's (again).
-
The answer really depends on whether or not you see yourself moving towards writing Windows Store style applications (possibly the crappest name for a tech stack ever). If you are happy writing desktop applications and will continue only writing desktop applications then WinForms is a fine choice. If you see yourself wanting to write TTSFKAM (The Technology Stack Formerly Known As Metro) then knowing WPF will certainly help.
*pre-emptive celebratory nipple tassle jiggle* - Sean Ewington
"Mind bleach! Send me mind bleach!" - Nagy Vilmos
CodeStash - Online Snippet Management | My blog | MoXAML PowerToys | Mole 2010 - debugging made easier
I suspect I'll have some other things later on, more suitable for TTSFKAM, but I'll burn that bridge when I get to it. :-)
-
Starting a new desktop application, I wonder whether I should stick with WinForms or try to learn WPF. On the one hand, the application is quite simple, GUI-wise, and has no need for any blending or animation or other 'cool' things. It's a form-based application, of the classic type that's been a Windows staple for 20 years. On the other hand, I've seen claims that WPF is the future. Mind you, Win7 is only now being picked up, and Win8 still supports old desktop applications. Learning WPF as a gateway to Silverlight seems a bit pointless now that SL seems to have been dropped. It's also unlikely I'd try to migrate this app to the cloud - if I did, I'd probably re-write it in PHP or Python. So that leaves WinRT. Is that the only reason for jumping to WPF? (I should probably note that this is a hobby project - in my day job I'm a C++ developer, which I'm happy with, so I'm not interested in learning WPF to "further my career". I tend to write GUI-based applications in C#/Winforms though, as MFC is a dog.) Grateful for reasoned advice.
WPF is still quite an immature technology. It is full of "featues". Just google for something like "WPF decimal comma" - and see many WTF solutions for such a simple thing as showing a decimal number corectly when you do not use an American number format. Try to change the value in the DateTimePicker with the keyboard - that does not work. When you changed the content of a text field, press enter to activate the default button (while the text field is still focussed), and the view model does not get updated. And many more such PITA. I prefer Windows Forms.