I presented about the Windows Presentation Foundation at yesterday’s INDC usergroup event in Dublin. First of all, congratulations to the many communities of Ireland and Northern Ireland who joined forces to host their most ambitious developer conference to date. I had a great time, and the consensus seems to be that INDC was an unequivocal success! Microsoft MVP Kieran, who distinguished himself on the day as a hands-on lab instructor, has posted his photos from the event up on Flickr.
The core of my WPF presentation demonstrated 3 concepts about Windows Presentation Foundation using 3 different tools:
- XAML, using Visual Studio 2005
- Styling and Templates, using Expression Interactive Designer
- Data Binding, using punchy little XamlPad
Rather than post my slides, I hope it will be helpful if I use this blog entry to outline the resources that I’ve found most useful for learning WPF. At the end, I’ll summarize with a list of links to everything you need to get started. Everything I’ll reference here is free to download.
[Updated 13 June: for Beta 2, rather than FebCTP, of WinFX.]
Tim Sneath‘s A Guided Tour of the Windows Presentation Foundation on MSDN is the best overview document I’ve found. It presents all the high-level concepts and features, complete with examples.
If you’ve read Tim’s Guided Tour, you might want to next explore the concepts hands-on. For me, that was the best way to to solidify the concepts in my head.
I found that the set of 3 Fabrikam Tutorials that come with Expression Interactive Designer offer the ideal walkthrough. They take you through the basics of Control Templates, Data Binding, and even some animation and effects (including the really cool VisualBrush that lets you replicate part of the scene for special effects like reflections!)
The reason I suggest you use Expression while learning WPF is that as you create things visually in Expression, you can hop back and forth between the designer and the XAML, and see what Expression is doing. It’s the next best thing to AutoComplete: once you know your way around Expression, you can use it to help teach you the XAML syntax.
And of course, you can always open your Expression projects up in Visual Studio, since they share a common Project file format. Here are links to some Expression resources.
If you are looking for information about a specific WPF feature, there are many useful nuggets in these Windows Presentation Foundation Hands-On Labs for Beta 2 (and, for completeness, here are the older hands-on labs that work for FebCTP). Here are the lab titles:
LNGW700 – Building WPF Applications
LNGW701 – Building WPF XAML Browser Applications
LNGW702 – Creating Rich 2D and 3D Content in WPF
LNGW703 – Using Data Binding in WPF
LNGW704 – Design and Styling in WPF
LNGW705 – Using Images and Effects in WPF
LNGW706 – Creating Custom Controls in WPF
The links above will direct you to these labs. (At time of writing, 5 of 7 have been ported to Beta 2.)
Specific Topics for Hands-On Exploration
Here are some topics that you may want to explore hands-on:
Video, Animation and 3D: see hands-on lab LNGW702 (link above).
Browser Applications: see hands-on lab LNGW701 (link above).
Bitmap Effects: see hands-on lab LNGW705 (link above).
Windows Forms Interop: this might be really important to you and your decisions to adopt WPF. See Crossbow for more on that topic.
One other cool nugget. My “Build an RSS Blog reader in 14 lines of XAML” example came from this Tim Sneath video on Channel 9. The updated code for the FebCTP is found in the comments at the bottom of that link (thanks to Shahn Hogan).
How to Get Yourself Set Up to Explore the Beta 2 of Windows Presentation Foundation, including Expression Interactive Designer
Start with an install of Visual Studio 2005. Using the Express Edition (C# or VB.NET) is fine, although the one thing you will miss is the “Cider” designer, which adds design support in Visual Studio.
Now, you need to install these bits, in order.
- WinFX Runtime Components (Beta 2) – everything you need to run WinFX applications
- Windows SDK (Beta 2) – for the developer documentation, tools, samples, etc.
- Microsoft Visual Studio Code Name “Orcas” Community Technology Preview – Development Tools for WinFX (Beta 2) – a terribly long and confusing name for the software that adds IntelliSense, new project types, and “Cider” to Visual Studio 2005
- Expression Interactive Designer (May CTP) – the application designed for designers
Please remember that these are all in beta, so the usual caveats apply about installing the above on a production machine.
To summarize my recommendations above, when you’ve installed these components, I recommend you:
- Read A Guided Tour of the Windows Presentation Foundation on MSDN
- Visit and subscribe to the WPF community site
- Go through the 3 Fabrikam walkthroughs in Expression
- Follow up with the Windows Presentation Foundation Hands-On Labs which are compatible with the above bits
Finally, as I mentioned at the end of my presentation, if you are interested in building something amazing with WPF between now and its launch, I’d love to hear from you!