08.01.2015 Views

Beginning Web Development, Silverlight, and ASP.NET AJAX

Beginning Web Development, Silverlight, and ASP.NET AJAX

Beginning Web Development, Silverlight, and ASP.NET AJAX

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

CHAPTER 8<br />

.<strong>NET</strong> 3.0: Windows Presentation<br />

Foundation<br />

Windows Presentation Foundation (WPF) is the unified presentation subsystem for<br />

Windows. It is made up of a display engine <strong>and</strong> a suite of managed classes that you can<br />

use to build applications that use it. It introduces XAML—an XML format that is used to<br />

define the UI, animations, interactions, <strong>and</strong> bindings, which are the “glue” of an application.<br />

Its ultimate aim is to provide a user experience beyond the traditional gray formlike<br />

interfaces of client applications. It introduces a new graphics driver model that is<br />

designed to use the power of the graphics processing unit (GPU) that is available to most<br />

modern desktop computers.<br />

In this chapter, you’ll take a look at the managed classes that provide the underpinnings<br />

of a WPF application, the XAML language that defines a WPF application, <strong>and</strong> the<br />

tools that can be used to build WPF applications, including Expression Blend, Expression<br />

Design, <strong>and</strong> Visual Studio 2008 (or alternatively, Visual Studio 2005 with the .<strong>NET</strong> 3.x<br />

extensions). You’ll wrap up the chapter by building a WPF-based UI on top of the AdventureWorks<br />

address data service that you’ve been using in earlier chapters.<br />

XAML<br />

WPF constructs its UIs using Extensible Application Markup Language (XAML), an XMLbased<br />

markup language that is used to compose, define, <strong>and</strong> interrelate WPF elements.<br />

It supports a number of built-in control definitions, such as to define a button.<br />

Here is how you would define a simple XAML document that contains a single button:<br />

<br />

<br />

177

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!