Sign In
Posted By: bryant | May 18th @ 10:02 PM
page 1 of 1
Comments: 7 | Views: 415

Alright, so I've gotten Visual Studio 2008 kicking with a few cool addins (Power Commands, modified template, etc...) and am looking to begin developing an application I've thought about for a while now.  I'm an incredibly big, ridiculously good at trivia, movie fan and I want to build an application that will keep track of all my movies that I have seen, that I want to see, that I want to see again, maybe include some ratings, and who knows what else.  I've been learning C# over the past few weeks and have gotten to the point where I'm ready to free form with an application like this. 

Here's my question:  Should I use WinForms or WPF?  I understand WPF would be better if I had video or 3D animation, etc..., but is that the only difference?  Are there benefits to picking it over WinForm or vice-versa?  Anyone out there have a preference?

(I'm incredibly interested to hear what you guys think.  However, I will mention that in learning C# through Head First With C# (which I highly recommend) I've been using Windows Forms Applications.  I will probably use that one to begin, but is there a way to port it to WPF later?  Basically, what are the big differences between the two?)

Thanks ahead of time guys!

I personally prefer Windows Forms because I "grew up" with it so to speak. WPF is nice, but can involve a bit of a learning curve if Windows Forms is what you're used to.

WPF has a much more (logical) emphasis on hierachy than Windows Forms, and support for animations (which can be simple and useful or jarring and convoluted). One difference that bugs me is that the buttons in WPF light up in accordance with Vista behaviour (subtle fade). Windows Forms has no such pretty effect.

Yeah, I get annoyed easily...

In terms of porting one to the other later on, if you keep your logic seperate from UI then this shouldn't be too difficult. Also remember that Windows Forms controls can be hosted in WPF and vice versa.

If you're only using Visual Studio I'd go with Windows Forms, but access to Expression Blend makes WPF a lot nicer to use. Ultimately, of course, its up to personal preference.

WPF is cool. You can also do all the stuff that you do in Windows Forms with WPF. Like there are button controls and stuff like that (that also look like the Windows standard buttons etc.) in WPF. It's not just for animations. WPF is for the basic application + you can easily skin stuff, animated stuff and do a lot of fancy stuff where you needed a lot of work in WinForms.

If you are starting with C# and .NET right now I would suggest you start with WPF. The learning curve is always there: if you do WinForms you need to learn it and if you do WPF you need to learn it. Since WPF is more powerful and the future I would do that Smiley
Personally for me, using WPF is really good and better approach than WinForms - WinForms is very plain whereas WPF is rich with styles, animations, design-code separation Smiley

You can do some of the things that you do in WPF in WinForms, but it will take hell lot of your time, instead you could directly use WPF itself!
So I was browsing the Windows Client website and found this pretty neat article to sum them up:

Deciding When To Adopt Windows Presentation Foundation
WPF addresses issues faced when using Winforms and adds much more, like C# 2.0 fixes issues with C# 1.0.Wonna use C# 1.0 over C# 2.0 ? Nuff said Smiley
page 1 of 1
Comments: 7 | Views: 415