35.3. Styling Your Application

Although the WPF designer built into Visual Studio 2008 provides a significant amount of functionality for laying out controls, you will find that it really only supports a small subset of the full capabilities of WPF. You will also note that there are significant limitations in the Properties tool windows, such as the inability to be able to select a font from an existing list, that make it hard to be effective when building WPF user interfaces. To overcome these limitations it is recommended that you use a complementary product called Expression Blend (Blend). Because both Blend and Visual Studio 2008 share a common solution format, it is easy to work between the two products, making design changes in Blend and programmatic changes in Visual Studio. Figure 35-10 shows the same solution open within Blend.

Figure 35.10. Figure 35-10

You will notice in Figure 35-10 that this is Expression Blend 2.5 March 2008 Preview. At the time of writing the next version of Blend was in beta, so there may be some minor variations between the content herein and the final product.

To demonstrate how you can use Blend to style your application, let's examine how you can apply a template to the Submit button that is at the bottom of the window. Start by right-clicking the btnSubmit element in the Objects and Timeline tool window, as shown in Figure 35-11.

Figure ...

Get Professional Visual Studio® 2008 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.