
WPF Designer Support
WPF applications can be built using nothing more than a simple text editor, a .NET language compiler (C#,
VB), and msbuild.exe. However, doing so for a large-scale project would be tedious and error prone.
Thankfully, Visual Studio has integrated WPF programming support that includes the following:
• WPF project templates.
• Integrated XAML editors.
• A WPF-aware Toolbox / Properties window.
The New Project dialog box provides a number of WPF project templates. The WPF Application icon is
used to build a traditional desktop executable. The WPF Browser Application project template provides a
starting point for XBAP development. You also have project types for custom WPF control libraries.
The WPF designer allows you to view not only the window / page itself but the underlying XAML. You can
build the UI of your form using the WPF Toolbox and related VS Properties window. As an alternative, you
can directly author XAML markup to change the UI of the window you are constructing. Notice the XAML
editor supports the expected IntelliSense.
The XAML editor also provides the ability to generate event handlers for events declared via XAML. When
you enter the name of an event for a given widget, you will find a New Event Handler pop up window.
Selecting this option will generate a name for your event handler. The corresponding code file will contain the
handler. The corresponding *.g.cs / *.g.vb file will contain the event wire-up logic.
At its heart, Visual Studio is a tool for software engineers. While you could use Visual Studio to author
XAML by hand, Microsoft Expression Blend is a far easier alternative. Visual Studio is better suited for
editing XAML generated using a dedicated tool.
Recall that Microsoft Expression Blend is a tool aimed at graphic designers. This tool allows those with
artistic talents to create a proper look and feel for WPF applications. Designers have no need to view the
underlying C# / VB code or XAML markup directly, which makes it an ideal tool for those without
programming experience.
Expression Blend makes use of the same project format as Visual Studio. Designers and programmers can use
dedicated tools to work on the same project.
This class will not examine the use of MS Expression Blend. Expression Blend is an entire class unto itself
and requires some level of graphic design experience. Nevertheless, you should download and experiment with
the evaluation version of Expression Blend, even if you have dedicated graphic designers on your team. Check
out http://www.microsoft.com/products/expression for more details.
WPF Designer Support
Table of Contents
Copyright (c) 2008. Intertech, Inc. All Rights Reserved. This information is to be used exclusively as an
online learning aid. Any attempts to copy, reproduce, or use for training is strictly prohibited.
Courseware
Training Resources
Tutorials
Services