Home | Blog | Software | Reviews and Features | Forum | Help | Donate | About us
topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • December 05, 2016, 10:37:30 AM
  • Proudly celebrating 10 years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Author Topic: .NET and GUIs: windows forms or the new WPF?  (Read 4216 times)

urlwolf

  • Charter Member
  • Joined in 2006
  • ***
  • Posts: 1,797
    • View Profile
    • Donate to Member
.NET and GUIs: windows forms or the new WPF?
« on: December 23, 2007, 01:01:34 PM »
I'm trying out C#, .NET and GUIs; The fist thing I noticed is that there are two GUI libraries: windows forms and the new WPF.

 WPF isNET 3.5 only.

We want this tool to be easily ported to pocket PC when the day comes.

WPF  seems to be the newest; the form is defined in AXML. It
 requires directX 9.
 
 This would exclude win 98 and older users, and maybe Pocket PC?
 
 This is what I have seen in a forum:
 
 WPF
 + Powerful styling and skinning structure
 + Easy to create an own Look and Feel
 + Does support Windows Forms
 + The future technology for developing Vista Applications
 + The ability to reuse existing code
 + Highly advanced databinding possible
 - Declarative vs procedural code
 - Requires .NET Framework 3.0
 - Compared to Windows Forms, still in development fase
 - Requires Dx9 compatible vidcard for advanced graphics
 
 Windows Forms:
 + Extensive documentation to be found on the internet
 + Plenty of examples
 + Does support WPF
 - How long will this be supported? (I've read somewhere that Microsoft is
 only developing WPF now, only maintanance for Winforms)
 - Design your own look and feel in a application is a lot of work.

Do you have any experience with WPF? Thoughts?

MrCrispy

  • Participant
  • Joined in 2006
  • *
  • Posts: 331
    • View Profile
    • Donate to Member
Re: .NET and GUIs: windows forms or the new WPF?
« Reply #1 on: December 23, 2007, 06:25:01 PM »
WinForms is not going away anytime soon. The core under WPF still uses the same .NET windowing libraries, so it will be supported for the forseeable future.

WPF and XAML are an order of magnitude easier to develop for, especially for cool looking GUI's. The tool support is somewhat lacking but Visual Studio 2008 (Orcas) as well as the various Expression products are now in pretty much final stage and downloadable for free. You will have a much easier time building rich UI's with it than plain old WinForms, simply because it enables coding at a higher level of abstraction than before.

When you feel like porting your app to the mobile platform, it would be easy to convert it to to use Silverlight, which is the new codename for WPF/E, which is a lighter version of WPF meant for browser apps. It is supported on the Compact Framework (PocketPC, phones, mobile etc). When I say 'is available' though I don't mean right now :) It should be out in the next release of CF.NET 3.5 (http://blogs.msdn.co...07/mix-and-medc.aspx)


urlwolf

  • Charter Member
  • Joined in 2006
  • ***
  • Posts: 1,797
    • View Profile
    • Donate to Member
Re: .NET and GUIs: windows forms or the new WPF?
« Reply #2 on: December 23, 2007, 08:07:08 PM »
Thanks MRCrispy.
I still don't understand. Is  WPF easier for normal-looking apps?
Are the new features,  like LINQ support available only in WPF GUIs?

MrCrispy

  • Participant
  • Joined in 2006
  • *
  • Posts: 331
    • View Profile
    • Donate to Member
Re: .NET and GUIs: windows forms or the new WPF?
« Reply #3 on: December 23, 2007, 08:49:35 PM »
It depends. WPF is both easier and harder because it is basically a new way of programming. I will try to explain but probably do a bad job - in most apps, you have to write the UI code and then write the code that does the real work. But building the UI is a design task and doing it by writing code is hard. There are visual designers to place controls etc but to build behavior you still have to write code  - e.g if I ant some part of the UI to animate when I click a button I have to write code for it.

With WPF you write the UI declaratively and in a much richer language (XAML) and it can be done by an actual designer. I'd say after the initial learning curve common to anything new, WPF is easier for any UI app except the trivial ones (like Notepad), and exponentially easier for any rich UI. There are a bunch of WPF tutorials and its easy to pick up and start playing with since its very rapid turn around.

(sorry if you knew all this, sounds like you have done your research into WPF!)

LINQ is a pure language feature which is part of C# 3.0. It has nothing to do with WPF other than the fact that the C# 3.0 compiler comes with .NET 3.5.

MrCrispy

  • Participant
  • Joined in 2006
  • *
  • Posts: 331
    • View Profile
    • Donate to Member
Re: .NET and GUIs: windows forms or the new WPF?
« Reply #4 on: December 23, 2007, 08:53:58 PM »
A good article discussing WPF, WinForms and Win32 -
http://msdn.microsof...ndation/default.aspx