简体   繁体   中英

Silverlight: How to load and run another silverlight .xap file

I want to know whether is it possible to load and run another xap file in a xap file.

If its possible please tell me how to do that with code. Thanks in advance!

You'd typically load an assembly contained within that .xap into the appdomain of your executing application (remember that .xap files are nothing more than .zip files renamed.)

You can request the assembly from your running code by using the WebClient.

Here's a straightforward way of doing this:

On Demand Loading of Assemblies in Silverlight

You can also use Microsoft Prism (now Composite Application Guidance ) to create modules that are loaded on demand:

http://www.codeproject.com/KB/silverlight/sl3prismnav.aspx

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM