Introduction to Silverlight and XAP.

In this article, I will introduce you to Silverlight and XAP (the file format that Silverlight applications use)

Introduction to Silverlight

Silverlight is Microsoft's cross-browser, cross-platform browser plug-in that offers a compelling RIA development experience that works on Linux, the Mac and windows as well as all major browsers.
It enables development of the next generation of Microsoft .NET-based media experiences and rich interactive applications (RIAs) for the Web. It allows the creation of interactive web applications that employ high quality streaming media, vector graphics, images and animation.Deployed as a plug-in for the major browsers, web developers can craft interactive applications that have an identical user experience on the vast majority of web browsers deployed today.

The Concept

Silverlight is based on Xaml, an XML-based description language for UI elements.
With Xaml, it is possible to separate the GUI from the implementation of the software. Designers can develop the GUI in Xaml with tools like Microsoft Expression Blend, and developers build the implementations for the GUI with VS 2008. This can be realized with a code-behind concept, similar to .aspx pages in ASP.NET. For each .xaml file, there exists a .xaml.cs file, containing the implementations like event-handlers for the UI elements. When creating a Silverlight project with the Silverlight project template, some sample files are generated, so that developers can get started with Silverlight. The .xaml file is embedded in an HTML page.

Creation of the XAP File

Many times, the Silverlight content will involve large pieces of external content, media files, Deep Zoom images, etc. While incorporating all this content into the Silverlight project, they get compiled and compressed into the XAP by default. These various pieces of content may seem like individual/loose files during development; but when the project is built, all these loose pieces of content get compressed and placed inside the XAP file.


Having items inside the XAP ensures that users see the default pre-loader inside the Silverlight plugin, which is automatically displayed when the application content (UI) is being downloaded onto the client browser. However, content that needs to be loaded on-demand, such as videos or photos in a photo gallery, need not be downloaded initially. Hence such content shouldn't be embedded inside the XAP file.

Web Site Projects

A Web Site project is the equivalent of a web site directory where loose files can be placed. When using Visual Studio, if you have existing Silverlight content, VS will ask if it can link the Silverlight output, known as a XAP file, to a location on the Web site project itself. Thus, the solution would be set up as follows:


When the project is built, the XAP file is created. This XAP file gets copied into the Web Site directory where it can access all content inside the Web site easily. Thus, the Silverlight project need not contain any content that need not be inside the XAP file: the XAP file contains only relevant content. Content that is required to be loaded on-demand can be simply placed in the Web Site Project instead of the XAP file.

The web site project will come with a preconfigured HTML file that loads and displays the XAP file. Since this file is located in the Web site project itself, building the Silverlight project will have no effect on any changes made to the HTML file inside your Web site project.



Author: Manindra Kumar Upadhyay03 Apr 2010 Member Level: Gold   Points : 0

try this link:

Author: Ahmad Nauman10 May 2010 Member Level: Bronze   Points : 2

It seems to me a different type of post ... One who does not know about this before maybe get useful information from this post ... I want to say that the way you tried to explain some post here it seems to me more. .. There are, of course, in various posts in here, but I didn't find any post in connection with projects like ccie lab... If someone has information about it, tell me! Well, all the updates related to this post? if so, what to do, tell me! Actually I came here while surfing online for information related to projects exam 70-270 , cisa exam questions and find this post different one ... Is there anyone having information on the ccnt? any updates, and if so, what to do, tell me!

  • Do not include your name, "with regards" etc in the comment. Write detailed comment, relevant to the topic.
  • No HTML formatting and links to other web sites are allowed.
  • This is a strictly moderated site. Absolutely no spam allowed.
  • Name: