What is a .xap file? - Silverlight

What is a .xap file? Explain with an example.

A .xap file is an application package based on Silverlight which will be generated when the Silverlight project is built. This file helpful in creating heavily client based Silverlight applications. A managed code can be used such as C# or VB and benefited by utilizing the tools.

A .xap file has an application manifest file (AppManifest.xaml) and the necessary DLL’s needed by the application. A manifest file looks like:
<Deployment xmlns="http:// "….”xmlns:x="http://......"EntryPointAssembly="SilverlightApplication1" EntryPointType="SilverlightApplication1.App" RuntimeVersion="2.0.30226.2">

<Deployment.Parts>
   <AssemblyPart x:Name="SilverlightApplication1" Source="SilverlightApplication1.dll" />
   </Deployment.Parts>
</Deployment>

The <Deployment> node describes the application and it contains child AssemblyPart nodes. The DLLs are contained in .xap file. The EntryPointAssembly attribute describes the selected assembly defined below is the main assembly for the application. And EntryPointType attribute describes the class that contains within the assembly that is defined in the EntryPointAssembly attribute. This is the class which is instantiated to commence the application.
Explain how can Silverlight use ASX files - Silverlight
An ASX file is an XML file in which media files are specified in the playlist. Using ASX files in silver is pretty simple. Assign the ‘ source’ property of a MediaElement object to the ASX file name...
Silverlight application life-cycle
Silverlight application life-cycle - The entry point of Silverlight applications is Silverlight Application class. It provides various services which is commonly needed by Silverlight application...
Role of Silverlight Plugin in the Silverlight Application
The Silverlight plug-in loads the core services of Silverlight followed by Silverlight Common Language Runtime. CLR creates domains for applications...
Post your comment