Start learning with our library of video tutorials taught by experts. Get started
Viewers: in countries Watching now:
Microsoft Silverlight 5 is a rich application framework for creating high-performance, cross-platform desktop and mobile applications. In this course, author Walt Ritscher demonstrates how to build a variety of applications in Silverlight, with particular focus on building compelling business applications and delivering premium video and audio content. Developers will work with the C# programming language and Visual Studio Professional, as well as Expression Blend, a tool that simplifies creation of the interactive user interfaces expected in modern-day applications.
Get ready to take a trip through the startup process of a typical Silverlight application. The key players in this movie are the Application Manifest file and the Silverlight plug-in. I'd like to walk you through the process of what happens when you ask for a page that contains Silverlight content. The first step is that the user requests an HTML page from the server. The Browser downloads the page and detects that there is a Silverlight content in the page. It does this by seeing that there is an object tag on the page, then the Browser loads a Silverlight plug-in because of the MIME type, let me show you that. I'm inside a solution called StartingUp. I'm going to compile my application, and then I'm going to look in the Bin folder.
To do that I'm going to click on my project, choose Show All Files, drill down into this Debug folder and look at this TestPage.html. This is a standard HTML page that has an object tag. Down here in this form section is a div, inside the div is an object tag, and the object tag tells it to load this MIME tag, this will cause the Silverlight plug-in to load. Once the Silverlight plug-in is loaded the Browser goes back to the server and asks for the XAP file. That is specified here in line 62.
So just go get the StartingUp.xap file. So the Browser makes a request back to the server, asks for this file, the Browser opens the XAP file which remembers just a ZIP file and reads the AppManifest.xaml file. You can see I have a copy of that here in my Bin directory; it's also embedded inside this XAP file. If I was to open that up you'd see it inside there, so let's open up the AppManifest.xaml file. The next step is that the manifest contains a list of assemblies to load.
You can see them shown here in lines three through five. It says that there is a DLL needed called StartingUp.dll which is my DLL, and then there are two of the framework DLLs; System.Windows. Controls.dll and System.Windows.Data.dll. It tells the Silverlight runtime to load those. The plug-in then loads the Silverlight runtime and then loads these assemblies. Next it goes back to the manifest and reads the manifest to find out information about your startup class. At the top of this page is listed the Deployment section and it says here that the entry point assembly is starting up.
So there are three assemblies down here, the one that's going to start running the coding is StartingUp.dll and it says to find a class called StartingUp.App. StartingUp.App is located in my App.xaml file. I can see that here, I need to look at the code behind page, so open this up and open my CS file, CS of course stands for C#. And there is my class, App which is inside the StartingUp namespace. Next thing that happens is it locates my application start procedure and runs whatever code it finds in there.
And as you can see, what is that doing? It's loading my main page as a Startup RootVisual, that just means the StartingUp UI that you'll see inside this Silverlight application. Once this happens your code starts running and once your application is running it will continue to run forever, unless one of three things happens. Your application has an unhandled exception, the user navigates to away from the host page or the Browser is closed.
Find answers to the most frequently asked questions about Silverlight 5 Essential Training.
Here are the FAQs that matched your search "":
Sorry, there are no matches for your search ""—to search again, type in another word or phrase and click search.
Access exercise files from a button right under the course name.
Search within course videos and transcripts, and jump right to the results.
Remove icons showing you already watched videos if you want to start over.
Make the video wide, narrow, full-screen, or pop the player out of the page into its own window.
Click on text in the transcript to jump to that spot in the video. As the video plays, the relevant spot in the transcript will be highlighted.