.NET & Funky Fresh

Syndication

News

  • <script type="text/javascript" src="http://ws.amazon.com/widgets/q?ServiceVersion=20070822&amp;MarketPlace=US&amp;ID=V20070822/US/bluspiconinc-20/8001/8b68bf4b-6724-40e7-99a5-a6decf6d8648"> </script>
Images in this post missing? We recently lost them in a site migration. We're working to restore these as you read this. Should you need an image in an emergency, please contact us at imagehelp@codebetter.com
.NET 3.0 Crash Course - Part 2: WPF Intro

                Windows Presentation Foundation (hereafter referred to as WPF) is a new API for creating graphical user interfaces for the Windows platform.  It is an alternative to WinForms that further empowers developers by providing an API capable of taking full advantage of the multimedia facilities of the modern PC.  Unlike WinForms, it does not wrap Win32 but is completely new, built from the ground up using .NET.  The fundamental power of WPF comes from the fact that it is vector based, hardware accelerated and resolution independent.

                Reminiscent of WinForms, you’ll find many of the controls you are used to when building applications: Button, ComboBox, ListBox, etc.  However, in WPF, your UI design is represented in a completely different fashion.  Instead of using a designer generated code file or a resource file as the source of a UI definition, WPF uses xml.  Specifically, it uses Xaml (more on this in the next post).  Please, don’t let this frighten or dissuade you.  It’s surprisingly intuitive and much easier than you would think (not to mention fun).  There are many other new features in WPF, too many to discuss in a “Crash Course.”  Below, you can see a chart depicting what I consider to be some of the most important features/innovations in WPF.

WPF Important Features

                The right column of the chart lists some technologies that you may be familiar with that parallel the ideas in WPF.  Hopefully this gives you a starting point for understanding the terms on the left.  Don’t take the parallels too literally; there are differences.  We’ll talk about each of these areas in future posts and I’ll provide additional resources for going into greater depth as well.

                Besides the above mentioned features there is a new type of application.  The standard windows application is alive and kicking, but you now have an additional option: the Xaml Browser Application.  When you deploy this type of application to a web server, users can navigate to a URL and run your program from within the IE7 sandbox.  The experience is similar to using a Flash app, but is restricted to users of IE7.  You can begin to imagine the types of rich intranet applications you could build for a company if you were given IE7 and .NET 3.0 as the platform.  At the same time, it’s too bad that it only works in IE7.  Don’t lose heart yet!  Microsoft is currently working on Windows Presentation Foundation Everywhere (WPF/E), a cross-platform, cross-browser subset of the .NET Framework and WPF!!!  Check this out for an early demo of WPF/E running in the Safari browser on Mac OSX.

                I should mention a few general items available for learning and working with WPF.  If you have installed the VS extensions for .NET 3.0, then you now have the “Orcas” designer available to you.  This is a tool much like the WinForms designer, but it is obviously for creating WPF UIs.  It has a tabbed design, so that you can switch back and forth between the visual designer and markup.  The powerhouse design tool is Expression Interactive Designer, which you can get here.  If you are more graphically inclined, you are going to want to check this out.  It is similar to using a tool like Adobe Illustrator, but it generates Xaml and integrates with the VS solution and MSBuild.  This is a landmark tool because it makes designers fully fledged members of the development team.  No longer do they need to do a UI mockup and deliver it to a developer to implement (or turn down because of its complexity).  They can simply build the UI using a set of tools that they are familiar with.  A similar third party tool is Mobiform’s Aurora.  The beta is free and I highly recommend investigating it.  There are also numerous plug-ins for exporting 2D/3D art to Xaml from most popular programs.  If you can’t find a plug-in, then perhaps you want to write one and enter it in this contest.  Regardless of whether you are approaching WPF from a developer or designer’s perspective, you are probably going to want a good book on the technology.  Currently, the best resource I know of is Charles Petzold’s book: Applications = Code + Markup.  I have read the first half of this book and it is quite thorough.

NEXT POST: Down & Dirty With Xaml


Posted 09-25-2006 3:22 PM by Rob Eisenberg
Filed under: ,

[Advertisement]

Comments

Rob Relyea wrote re: .NET 3.0 Crash Course - Part 2: WPF Intro
on 09-26-2006 10:39 AM

Nice writeup.

One correction, Xaml Browser Applications run inside of IE6 or IE7.

Today, they also can run inside any browser that uses the WebBrowser control - that includes Netscape running in IE mode, and FireFox (via its IE tab extension).  (Note, the OS must be Windows XP SP2 or later)

Thanks, Rob Relyea

Program Manager, WPF Team

Rob Eisenberg wrote re: .NET 3.0 Crash Course - Part 2: WPF Intro
on 09-26-2006 11:07 AM

Holy cow!  Rob Relyea posted a comment on my blog!  Thanks for the correction!

Bob Yexley wrote re: .NET 3.0 Crash Course - Part 2: WPF Intro
on 09-26-2006 11:59 AM

This is a great series Rob, thanks for writing it. I'm looking forward to the rest of it as well. Keep up the nice work.

About The CodeBetter.Com Blog Network
CodeBetter.Com FAQ

Our Mission

Advertisers should contact Brendan

Subscribe
Google Reader or Homepage

del.icio.us CodeBetter.com Latest Items
Add to My Yahoo!
Subscribe with Bloglines
Subscribe in NewsGator Online
Subscribe with myFeedster
Add to My AOL
Furl CodeBetter.com Latest Items
Subscribe in Rojo

Member Projects
DimeCasts.Net - Derik Whittaker

Friends of Devlicio.us
Red-Gate Tools For SQL and .NET

NDepend

SlickEdit
 
SmartInspect .NET Logging
NGEDIT: ViEmu and Codekana
LiteAccounting.Com
DevExpress
Fixx
NHibernate Profiler
Unfuddle
Balsamiq Mockups
Scrumy
JetBrains - ReSharper
Umbraco
NServiceBus
RavenDb
Web Sequence Diagrams
Ducksboard<-- NEW Friend!

 



Site Copyright © 2007 CodeBetter.Com
Content Copyright Individual Bloggers

 

Community Server (Commercial Edition)