ESL Projects

ESL proposes three types of Silverlight projects:

What's In a Silverlight Web Application

By default a newly created Silverlight Web application project contains a Page.xaml and App.xaml file, as well as code behind class files (C# code supported) that are associated with them.

XAML files are XML text files that can be used to declaratively specify the UI of a Silverlight or WPF application. XAML can also be used more broadly to declaratively represent .NET objects.

The App.xaml file is typically used to declare resources, such as brush and style objects that are shared across the application. The Application code-behind class for the App.xaml file can be used to handle application level events - like Application_Startup, Application_Exit and Application_UnhandledException.

The Page.xaml file is by default the initial UI control that is loaded when the application activates. Within it we can use UI controls to define our user interface, and then handle events off of them within the Page code-behind class.

When build HelloWorld project, Code and .xaml markup will default compiled into a standard .NET assembly file, and then package it and any static resource (like images or static files we want to include in it) into a "HelloWorld.xap" file on disk.

"xap" files (pronounced "zap") use the standard .zip compression algorithm to minimize client download size. "HelloWorld" application is about 5KB in size.

Note:Some controls are implemented in assemblies that if used are redistributed in the application's .xap file(which will increase an application's size above the 5kb base size). All of the controls used in the HelloWorld application will be in the core Silverlight download package - which means that the total download size of the finished application will probably only be in the 6-9kb range (so very small and fast).

To host and run a Silverlight application, you can add an <object> tag into any standard HTML page (no JavaScript required) that points to the .xap file. Silverlight will then automatically download the .xap file, instantiate it, and host it within that HTML page in the browser.