Overview
The XAP file is a packaged file of the Silverlight 2 application compilation, a standard zip-compressed file that includes all the files required for Silverlight 2 applications, such as assemblies, resource files, and so on.
What is the Xap file?
The XAP file is a packaged file for Silverlight 2 application compilation, including all the files required for Silverlight 2 applications, such as assemblies, resource files, and so on. The XAP here does not have any special meaning, only the extension of the generated file after the Silverlight 2 application compiles, which is essentially a standard zip-compressed file. We can modify the. xap file suffix to a. zip file and open it with a decompression tool, and you can see the files it contains:
How to use the XAP file
The use of XAP files must have been well known, and in the ASP.net page we can use Silverlight control to refer to XAP files, as shown in the following code:
Note the Silverlight control relies on ScriptManager, so you must have a ScriptManager control on the asp.net page. In HTML pages (or PHP, JSP, etc.), we can use the following methods:
The type= "APPLICATION/X-SILVERLIGHT-2-B2" here specifies that the current version is Silverlight 2 Beta 2, followed by a hyperlink that specifies that Silverlight is not installed on the user's machine 2 plugin when the download address and display the picture.