Building a Perfect WPF Developer Workstation
OK, so you've just decided that WPF is the strategic technology of choice for your next-generation application, and you've taken the opportunity to flatten and reinstall your developer workstation. What should you put on it to create the perfect WPF development environment? There are so many good tools, utilities and samples out there, that I thought I'd put together a little checklist that will hopefully help folk out. I'd love to hear your suggestions for anything that I've missed: I'll try to keep this updated over time.
- Windows Vista, of course! (although I'll concede that Windows XP Service Pack 2 will work too...)
- Visual Studio 2005 with Service Pack 1 and Windows Vista Support Files
- Visual Studio 2005 Extensions for .NET Framework 3.0
- Windows SDK
- Expression Blend and Expression Design
Tools and Utilities
- XamlPadX, Kaxaml and XamlCruncher: three enhanced alternatives to the XamlPad tool that ships in the SDK. Each have their strengths: XamlPadX has some nice add-ons and is based on the XamlPad codebase, Kaxaml is great for demos and has good tab / indent support and XamlCruncher has high-quality source code available.
- Lutz Roeder's .NET Reflector: handy for browsing through class hierarchies;
- Snoop: Peter Blois' tool for visually debugging WPF applications;
- WPF Performance Tools: buried in the SDK but an essential part of the toolset for an application in the stabilization stages. Youll find it as %SdkTools%\WpfPerf.exe (make sure you run it as an administrator if you're using Windows Vista);
- Flexible Application Template: this replacement project template from one of the app services PMs allows you to create a single application project that can flip between an XBAP (web browser project) or rich client application just with an adjustment to the project type;
- ZAM 3D: Electric Rain's utility for quickly creating and animating 3D meshes.
- XAML Converters: Utilities for converting 3DS, DXF, Blender, Fireworks, Lightwave, SWF, Maya and Illustrator files to XAML format.
Building a Code Toolbox
- 3D Tools for WPF: interactive 2D on 3D surfaces, wireframe lines, 3D mouse navigation;
- Kevin's Bag-o-Tricks: a collection of controls that extend and enhance the intrinsic types ColorPicker, FolderPicker, NumericUpDown, RadioButtonList, date controls, animating tile panel and graph controls;
- UI Automation Stress: stress testing for your application environment. (Add this code into a debug menu to make sure that you can't crash your application with spurious input.)
I'm the kind of developer who likes lots of sample code available to me for copying concepts, ideas and techniques. Copy these to a \samples directory for quick access:
Also unpack %SdkTools%\..\Samples\WPFSamples.zip to a \samples\sdk directory so you can easily browse through all the samples without needing to go through the SDK documentation interface.
Now enable Windows Desktop Search (install WDS 3.0 here if you're running Windows XP) and configure it to index file contents of .xaml, .cs, .vb files as a bare minimum. Make sure it's set to index the entire \samples directory that you put the above samples into. Now you can quickly pull up every sample that shows the usage of (say) BitmapSource and ColorConvertedBitmap just by hitting Win+F and searching for those keywords.
- The WPF MSDN Forum is frequented by both the product team and many other knowledgeable community members, and contains a great archive of questions previously asked (and answered);
- The WPF MSDN Newsgroup provides a very similar service to the web forum but in the form of a USENET newsgroup. At the time of writing, the forum seems to have significantly more traffic, however.
Tips and Tricks
- Make sure that you integrate the Windows SDK documentation with the rest of the MSDN documentation on your system: run Start -> Windows SDK -> Visual Studio Registration -> Integrate Windows SDK with Visual Studio 2005 as an administrator for easy F1 integration from the code view.
- I make liberal use of pinned shortcuts on my Start menu to make it easier to access some of these tools, particularly XamlPad, WpfPerf and other tools that are really hidden by default. If you're running Windows Vista, this tip will give you a quick shortcut to each of these items also.
- Set the Windows Presentation Foundation Font Cache system service to Automatic (Delayed Start) if you are running Windows Vista, to reduce initial start-up time for WPF applications.
- In Visual Studio, set the default font to Consolas - it's easier on the eyes than Courier New and was designed with code development in mind. Consolas is included with Windows Vista or Office 2007, or you can download it here.
- From the Windows SDK documentation, the "New in Windows Vista" index filter is a great way to ensure that you don't get the WPF and Windows Forms APIs accidentally mixed up: I've come across a few developers who had accidentally started using types from both libraries together simply because they hadn't spotted the very subtle clues in the documentation that differentiate them.