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 15 ■ ENHANCING THE WEB EXPERIENCE WITH SILVERLIGHT 361<br />

}<br />

<br />

<br />

<br />

<br />

<br />

create<strong>Silverlight</strong>();<br />

<br />

<br />

<br />

<br />

Figure 15-1 shows how this looks in the browser when it is first run.<br />

Figure 15-1. Running your first <strong>Silverlight</strong> application<br />

When the user clicks on the TextBlock, the JavaScript event h<strong>and</strong>ler for it fires <strong>and</strong><br />

changes the text. You can see the result in Figure 15-2.<br />

In this section, you’ve seen the anatomy of a <strong>Silverlight</strong> application. You’ve seen how<br />

to create an instance of the <strong>Silverlight</strong> control using the st<strong>and</strong>ard library, <strong>and</strong> how to load<br />

XAML into it, rendering it <strong>and</strong> programming it using JavaScript.<br />

In the next section, you’ll look into the <strong>Silverlight</strong> control itself <strong>and</strong> its API in some<br />

more detail.

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

Saved successfully!

Ooh no, something went wrong!