WPF v Windows Forms


G

Guest

Hello all,

I am just trying to get up to speed with WPF (and .Net 3.0 in general), and
trying to decide whether it is worth using WPF for a new business application
(job tracking) which will be used by small businesses on windows Pcs
(XP/Vista). Hope to have it
ready by late 2007.

The only reasons I can see to use WPF instead of WinForms are:

Built on direct X and not win32 subsystem for graphics rendering (but what
precisely is the benefit of that for a business app?)

XAML may be easier for designers (non coders);

Possibly can acheive a new look which Winforms cannot (but not sure what
that is - any examples?)

What other specific reasons should be taken into account?

Thanks
 
Ad

Advertisements

R

RobinS

Check out the WPF site for examples, to see what WPF apps look like. Also,
if you google Windows Presentation Foundation, you will find more examples.

The official site: http://wpf.netfx3.com/

I would say it depends on what kind of data you are displaying, what you're
going to do with the app, etc.

Robin S.
 
B

Bruce Wood

Hello all,

I am just trying to get up to speed with WPF (and .Net 3.0 in general), and
trying to decide whether it is worth using WPF for a new business application
(job tracking) which will be used by small businesses on windows Pcs
(XP/Vista). Hope to have it
ready by late 2007.

The only reasons I can see to use WPF instead of WinForms are:

Built on direct X and not win32 subsystem for graphics rendering (but what
precisely is the benefit of that for a business app?)

XAML may be easier for designers (non coders);

Possibly can acheive a new look which Winforms cannot (but not sure what
that is - any examples?)

What other specific reasons should be taken into account?

Caveat: I have not started using WPF yet. The following is just from
what I've read....

PROS
Easier skinning (should you want to do that): easier for branding,
changing look of entire application for special needs. (Say, large
company wants application branded with their logo, colours, etc.)
Vector-based graphics make continuous scaling possible, may be better
for people with vision problems, etc.
Ability to cleanly separate UI functionality (code) from UI look
(design). Artsy-type designer people can work on look and feel
independent of programmers. (But if you're writing it all yourself,
that probably doesn't matter.) No, they probably won't learn XAML, but
then that's what design tools are for....
Any future UI enhancements will probably be exclusively for WPF and
not back-ported to WinForms.

CONS
Brand new. Version 1.0 of anything, by any company, is always scary.
That goes double for a complete rewrite of an operating system's UI.
Mind you, it probably won't take long to work the bugs out, but bugs
there will be....
 
L

Linda Liu [MSFT]

Hi,

You're almost right.

WPF is Microsoft's unified presentation subsystem for Windows and is
exposed through .NET Framework v3.0, Windows Vista's managed-code
programming model.

Windows Presentation Foundation (WPF) consists of a display engine that
takes full advantage of modern graphics hardware and an extensible set of
managed classes that development teams can use to create rich, visually
stunning applications. WPF also introduces Extensible Application Markup
Language (XAML), which enables developers and designers to use an XML-based
model to declaratively specify the desired user interface (UI) behavior.

Windows Presentation Foundation provides a unified approach to user
interface, 2D and 3D graphics, animation, documents and media. It allows
designers to be an integral part of the application development process.

Since the initial release of the .NET Framework, many applications have
been created using Windows Forms. Even with the arrival of WPF, some
applications will continue to use Windows Forms. For example, anything that
must run on systems where WPF isn't available, such as older versions of
Windows, will most likely choose Windows Forms for its user interface. New
applications might also choose Windows Forms over WPF for other reasons,
such as the broad set of controls available for Windows Forms.

Letting WPF applications use these existing controls can make sense in some
cases. Conversely, WPF offers many things that Windows Forms does not, such
as 3D graphics and animations. Allowing an existing Windows Forms
application to incorporate parts of WPF's functionality also makes sense.

Both of these things are possible. A WPF application can host Windows Forms
controls, and a Windows Forms application can host WPF controls. A user can
interact with WPF dialogs and Windows Forms dialogs in the same
application, typically without being aware that there's any difference.

To host Windows Forms controls, a WPF application relies on WPF's
WindowsFormsHost control. Similarly, a Windows Forms application uses
ElementHost, a Windows Forms control that's capable of hosting WPF
controls, panels, and other elements.

The tools for each technology can also work with software written for the
other. WPF's Visual Designer can be used to position Windows Forms
controls, while the Windows Forms designer can be used to position WPF
controls.

Using WPF and Windows Forms together does have some restrictions. Layering
a WPF control on top of a Windows Forms control won't work, for example;
the Windows Forms control will always be on top. WPF's transparency effects
also won't work well with Windows Forms controls, nor will WPF
transformations. And because the WindowsFormsHost and ElementHost controls
require full trust, a WPF application that uses them can't run as an XBAP.
Still, a large percentage of Windows applications can use both WPF and
Windows Forms to create their user interface.

Hope this helps.

If you have any question, please feel free to let me know.


Sincerely,
Linda Liu
Microsoft Online Community Support

==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscriptions/support/default.aspx.
==================================================

This posting is provided "AS IS" with no warranties, and confers no rights.
 
G

Guest

Linda and the others who have replied,

Thank you for your responses - much appreciated.

It seems that for a typical client business application (think Quickbooks)
there is no real need for 3D graphics and animations, and so there does not
appear to be any user benefit (which is the main focus). So windows forms
appears to be the way to go for now (i.e. anything to be released later this
year, 2007).

In addition, WPF is at v1.0 and Vista desktop penetration will take a while.

Would be interested if anyone "violently" disagrees!
 
L

Linda Liu [MSFT]

Hi Vulcanite,

Thank you for your response.

I agree with you : )

If you have any other questions, please feel free to let me know.

Thank you for using our MSDN Managed Newsgroup Support Service!

Sincerely,
Linda Liu
Microsoft Online Community Support
 
Ad

Advertisements


Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top