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.

184<br />

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

<br />

<br />

<br />

<br />

Finally, Window1.xaml is the default window that the template provides. It is a basic<br />

XAML page defining a window, <strong>and</strong> a grid is placed on it. The Grid is a basic layout control,<br />

in which controls placed within it can appear using a “grid layout” methodology—<br />

meaning that they appear at the coordinates specified using their x <strong>and</strong> y properties.<br />

There are several layout controls available in WPF, allowing you to place controls in a<br />

stacked or flow manner (you’ll be looking at these a little later on in this chapter). Here’s<br />

the code for Window1.xaml:<br />

<br />

<br />

The basic layout of the Blend IDE when you are editing a project is shown in<br />

Figure 8-7. At the very left is the toolbar. To the right of this are the interaction tools,<br />

where timelines, triggers, <strong>and</strong> animations are designed. In the center is the Designer/XAML<br />

Editor. F11 puts you into Visual Design mode, where you can drag <strong>and</strong> drop XAML controls<br />

onto the page, <strong>and</strong> use a code editor that allows you to tweak your current XAML<br />

code. The right side of the screen is the management area, where you control your project,<br />

your connections to outside data sources, <strong>and</strong> the properties of the components you<br />

are currently editing.<br />

Creating UIs with Blend<br />

The left-h<strong>and</strong> side of the screen contains the control bar. When you hold the mouse<br />

down on any of the control icons (they have a triangle on their bottom-right-h<strong>and</strong> corner),<br />

the controls within that family will pop up. For example, if you hold the mouse on<br />

the Button icon, the list of selectable controls (such as CheckBox <strong>and</strong> RadioButton) will<br />

appear (see Figure 8-8).

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

Saved successfully!

Ooh no, something went wrong!