Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Windows Forms / WinForm General / February 2008

Tip: Looking for answers? Try searching our database.

WPF or Windows Forms

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
John - 24 Feb 2008 17:34 GMT
Hi

If I have a choice of WPF or Windows Form versions of a control which one
should I purchase?

Thanks

Regards
Jon Skeet [C# MVP] - 24 Feb 2008 19:05 GMT
> If I have a choice of WPF or Windows Form versions of a control which one
> should I purchase?

Without wishing to be obvious: whichever framework you plan to write
your application in.

That will depend on a number of factors:

1) What operating systems do your clients have? WPF only works on
reasonably recent versions of Windows (e.g. not Win98)

2) What version of Visual Studio do you plan to use to develop your
application? Visual Studio 2008 has WPF support, but you'd have to use
various extensions and plug-ins for VS2005, which aren't terribly
satisfactory.

3) Do your clients have .NET 3.0 installed? Are you happy to install it
on their boxes?

WPF is (in my view) a much more pleasant UI library to work with than
Windows Forms - but it does require more modern software to support it.

Signature

Jon Skeet - <skeet@pobox.com>
http://www.pobox.com/~skeet   Blog: http://www.msmvps.com/jon.skeet
World class .NET training in the UK: http://iterativetraining.co.uk

John - 24 Feb 2008 19:19 GMT
Thanks. I use vs 2008 and all clients have win 2000 but mostly winxp.

Does wpf reduce application execution speed noticeably compared to windows
form?

Thanks

Regards

>> If I have a choice of WPF or Windows Form versions of a control which one
>> should I purchase?
[quoted text clipped - 17 lines]
> WPF is (in my view) a much more pleasant UI library to work with than
> Windows Forms - but it does require more modern software to support it.
Jon Skeet [C# MVP] - 24 Feb 2008 19:41 GMT
> Thanks. I use vs 2008 and all clients have win 2000 but mostly winxp.
>
> Does wpf reduce application execution speed noticeably compared to windows
> form?

It depends what you do with it - and what graphics card you've got. WPF
is accelerated by graphics cards (I believe) whereas Windows Forms
doesn't take as much advantage of them.

I believe that WPF is much more efficient overall - but tends to be
used to do snazzier things, which obviously have their own costs.

Personally, I'd try the kinds of things you want your app to do,
prototyping in both frameworks, and make a decision when you've got
that data.

Signature

Jon Skeet - <skeet@pobox.com>
http://www.pobox.com/~skeet   Blog: http://www.msmvps.com/jon.skeet
World class .NET training in the UK: http://iterativetraining.co.uk

Steve Gerrard - 24 Feb 2008 20:24 GMT
> I believe that WPF is much more efficient overall - but tends to be
> used to do snazzier things, which obviously have their own costs.

Jon, do you see future support as an issue at all? Or do you expect both to be
equally well supported long term?
Jon Skeet [C# MVP] - 24 Feb 2008 20:55 GMT
> > I believe that WPF is much more efficient overall - but tends to be
> > used to do snazzier things, which obviously have their own costs.
>
> Jon, do you see future support as an issue at all? Or do you expect both to be
> equally well supported long term?

I suspect both will be supported for the foreseeable future. WPF has
been given so much emphasis that MS would lose face by dropping it now,
and there's so much code using Windows Forms that it would be madness
to stop supporting that.

Signature

Jon Skeet - <skeet@pobox.com>
http://www.pobox.com/~skeet   Blog: http://www.msmvps.com/jon.skeet
World class .NET training in the UK: http://iterativetraining.co.uk

Galen Somerville - 24 Feb 2008 22:22 GMT
>> > I believe that WPF is much more efficient overall - but tends to be
>> > used to do snazzier things, which obviously have their own costs.
[quoted text clipped - 7 lines]
> and there's so much code using Windows Forms that it would be madness
> to stop supporting that.

Look how much code used VB6 and they dropped that. Why wouldn't they drop
Windows Froms too.

Galen
Jon Skeet [C# MVP] - 24 Feb 2008 22:28 GMT
<snip>

> Look how much code used VB6 and they dropped that. Why wouldn't they drop
> Windows Froms too.

True enough - but VB6 was sounding "old" by then. WinForms may sound
old compared with WPF, but it's still on the shiny .NET platform
they're pushing.

I don't *think* MS would drop support for it any time soon...

Signature

Jon Skeet - <skeet@pobox.com>
http://www.pobox.com/~skeet   Blog: http://www.msmvps.com/jon.skeet
World class .NET training in the UK: http://iterativetraining.co.uk

RobinS - 25 Feb 2008 00:33 GMT
> <snip>
>
[quoted text clipped - 6 lines]
>
> I don't *think* MS would drop support for it any time soon...

I agree, especially since there's so many controls not yet available in WPF,
and it's not as stable as Windows Forms. To me, it also seems like it's more
for graphics type apps than for business store-data-and-report-it kind of
apps.

Just my two cents' worth.
RobinS.
kimiraikkonen - 25 Feb 2008 10:00 GMT
> > <snip>
>
[quoted text clipped - 21 lines]
>
> - Show quoted text -

I suspect WPF may require a graphic card as heavy as Vista's aero with
no certain experience.
Smokey Grindel - 25 Feb 2008 04:00 GMT
"WinForms" is just a wrapper for Win32 forms... to drop Win32 forms you'd
have to rewrite every windows app out there that has a UI... so don't epect
MS to drop them anytime soon...

>>> > I believe that WPF is much more efficient overall - but tends to be
>>> > used to do snazzier things, which obviously have their own costs.
[quoted text clipped - 12 lines]
>
> Galen
Alex Clark - 25 Feb 2008 23:19 GMT
> "WinForms" is just a wrapper for Win32 forms... to drop Win32 forms you'd
> have to rewrite every windows app out there that has a UI... so don't
> epect MS to drop them anytime soon...

No.  There's nothing stopping MS from dropping WinForms support from .NET
4.0; it has nothing to do with continuing support for Win32 forms at all.
WPF is also based at its lowest level on Win32 forms and is essentially just
another wrapper around it with some DirectX thrown in for fun.

The WinForms base classes could effectively be culled and replaced by WPF in
.NET 4.0 and it wouldn't have the slightest impact on the existence of Win32
forms in Vista or Windows 7.

The only thing stopping MS from doing it is how much it would piss off all
the programmers, which they're working to make obselete in the next release
of VS ("Oslo") anyway...
Terry - 25 Feb 2008 13:44 GMT
I have to wonder if VS2008/WPF is really ready for prime time.  I had some
time this weekend and finally installed the DVD with VS2008 I had gotten.  
Open a WPF application and place a button on the form, code the click event
to show a message box, hit the F5 key and get an error that has nothing to do
with my code!
Error Option Strict On disallows implicit conversions from
'System.Windows.Application' to 'WpfApplication1.Application'.

It was easy to fix, but it sure makes me wonder if it is worth my time to
even start to use WPF yet!
Signature

Terry

> Hi
>
[quoted text clipped - 4 lines]
>
> Regards
BlackWasp - 25 Feb 2008 18:48 GMT
I have started down the WPF path as a learning exercise.  It does seem to be
quite fun and like the way that the vector-based output resolves the problem
of pixel-based rendering.  (Jumping from my 1280x1024 19" LCD to my
1920x1200 15" laptop shows the problem to good effect!)

I haven't noticed any stability problems as yet but there are some controls
missing as you point out.  I will be trying out the grid and other controls
from Infragistics pretty soon I imagine.  Anybody got any experience of
these - good or bad?

Signature

BlackWasp
www.blackwasp.co.uk

>I have to wonder if VS2008/WPF is really ready for prime time.  I had some
> time this weekend and finally installed the DVD with VS2008 I had gotten.
[quoted text clipped - 17 lines]
>>
>> Regards
Terry - 25 Feb 2008 19:03 GMT
Well I have spent some more time with it and am even less impressed.  Just
fooling around with a regular windows form app. and am having all sorts of
wierd problems.  Half the time when I hit the F5 key, I get 2 (back to back)
error messages telling me that the <path>.form1.vb can not be accessed at
this time.  I put controls on the form and hit the F5 key, and the controls
arn't  there  in run mode.  I hit save and get out and back in and my changes
wern't saved!  This has happened several times!  It may have something to do
with resizing the form, not sure yet.  But like I said - I am not impressed!  
I am using the version that came with my MSDN subscription that I received a
couple of months ago - wonder if there is an update somewhere.
Signature

Terry

> I have started down the WPF path as a learning exercise.  It does seem to be
> quite fun and like the way that the vector-based output resolves the problem
[quoted text clipped - 27 lines]
> >>
> >> Regards
BlackWasp - 25 Feb 2008 21:07 GMT
Weird.  I am using the Team Development version downloaded from MSDN.

I am only using C#, not VB.  Can't see why this would be a problem though.

Signature

BlackWasp
www.blackwasp.co.uk

> Well I have spent some more time with it and am even less impressed.  Just
> fooling around with a regular windows form app. and am having all sorts of
[quoted text clipped - 53 lines]
>> >>
>> >> Regards
Alex Clark - 25 Feb 2008 23:09 GMT
>I have to wonder if VS2008/WPF is really ready for prime time.

It isn't.  Plain and simple.  WPF is to WinForms as Vista is to Windows;
some nice shiny new promises with very questionable implementation.

I started to rewrite a small stats application for one of my customers a few
weeks ago.  I got as far as wondering why I couldn't get root-lines to show
up on a tree-view control, and after much Googling realised that I'd need
100+ lines of XAML template-altering non-intuitive chevron and curly bracket
laced code written by some hobbyist on the internet for something that still
wouldn't quite work the same way as the original root lines in good old
fashioned WinForms.  This is how MS define WPF as being "finished".  Yeah,
right...

If MS really want people to start seriously developing with this new
platform, they need to finish it first.  Some areas feel like giant leaps
forward, others feel like big steps backwards and some controls just haven't
been implemented at all.

Couple that to a severe lack of decent examples and sample code, and the web
being littered with samples that date back to November CTPs using code that
doesn't work anymore, and it didn't take me long to realise I won't be using
WPF for anything any time soon.

> Error Option Strict On disallows implicit conversions from
> 'System.Windows.Application' to 'WpfApplication1.Application'.

Yep, I got that every time as well.  Turns out VS2008 isn't strictly
finished for the new platform either.  There were many basic GUI things I
found that couldn't be done in VS and required me to use Expression Blend,
many simple layout things I couldn't do in Expression that I had to do in
VS2008 (I can't tell you how much fun it is to keep switching from one
gigantically memory hungry app to another every 5 minutes, telling it to
reload your project) and some relatively simple things that couldn't be done
in either one and required me to edit XAML directly.

And don't even get me started on the new printing services.  Such a
collossal wreck that even Tom Cruise himself wouldn't be able to help.
Herfried K. Wagner [MVP] - 25 Feb 2008 23:33 GMT
Alex,

"Alex Clark" schrieb:
> I started to rewrite a small stats application for one of my customers a
> few weeks ago.  I got as far as wondering why I couldn't get root-lines to
[quoted text clipped - 4 lines]
> good old fashioned WinForms.  This is how MS define WPF as being
> "finished".  Yeah, right...

Let's hope that Microsoft does not only plan to add new controls to WPF
(ribbon etc.) but complete the existing WPF controls:

.NET 3.5 Client Product Roadmap - ScottGu's Blog
<URL:http://weblogs.asp.net/scottgu/archive/2008/02/19/net-3-5-client-product-roadmap.aspx>
-> "WPF Control Improvements"
-> "VS 2008 WPF Designer Improvements"

Currently I would not use WPF because the existing controls are so
incomplete and filling the gaps with custom styles will may require a
partial rewrite when the styles are added to the controls.

Signature

M S   Herfried K. Wagner
M V P  <URL:http://dotnet.mvps.org/>
V B   <URL:http://dotnet.mvps.org/dotnet/faqs/>


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.