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

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

178<br />

CHAPTER 8 ■ .<strong>NET</strong> 3.0: WINDOWS PRESENTATION FOUNDATION<br />

Hello, <strong>Web</strong>.Next Readers!<br />

<br />

<br />

WPF parses this document <strong>and</strong> uses the elements that are defined within it to implement<br />

<strong>and</strong> render the UI. You can see the results of this in Figure 8-1.<br />

Figure 8-1. Rendering the XAML button<br />

As WPF provides a vector-based rendering system, the application can be resized,<br />

<strong>and</strong> the button will be resized along with it without losing fidelity. Figure 8-2 shows the<br />

same application window where the user has resized it to make it much larger.<br />

Figure 8-2. Resizing the button window<br />

As you can see, the button resized <strong>and</strong> fit itself according to the dimensions of the<br />

window. This approach provides a number of distinct advantages over the previous<br />

form/control methodologies for defining <strong>and</strong> running UIs:<br />

It allows for the separation of UI definition <strong>and</strong> application logic. Designers can use<br />

tools such as Expression Blend (which you will see later in this chapter) to define the<br />

UI look <strong>and</strong> feel, as well as how interactions take place within the UI. Design output<br />

is expressed in XAML, which is then taken up by developers to implement the application<br />

logic. Prior to XAML, there was a huge impedance mismatch between

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

Saved successfully!

Ooh no, something went wrong!