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 ■ .<strong>NET</strong> 3.0: WINDOWS PRESENTATION FOUNDATION 203<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

17. Running the application will now give you the data neatly separated within the list<br />

(see Figure 8-25).<br />

Figure 8-25. Binding the data with an enhanced template<br />

Adding a Simple Timeline Animation<br />

Now, the designer is likely to want to have some kind of UI glitz happening. For this<br />

example, we will make the list box fade in from invisible as it slides in from the left-h<strong>and</strong><br />

side. This is achieved using animation timelines.<br />

First you will want to create the trigger that fires when the button is clicked. You do<br />

this by selecting the button in the Objects <strong>and</strong> Timeline pane, <strong>and</strong> then the + Event Trigger<br />

button in the Triggers pane. The IDE will create the default trigger, which is<br />

Window.Loaded. Don’t worry!<br />

Underneath the Window.Loaded entry in the Triggers window, you will see the trigger<br />

definition section—it reads “When Window Loaded is raised,” with “Window” <strong>and</strong> “Loaded”<br />

as drop-downs (see Figure 8-26).

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

Saved successfully!

Ooh no, something went wrong!