How to: Load Prism modules packaged in a separate XAP file in an OOB application3 Comments
I have seen many questions, both in the Codeplex (here) and StackOverflow forums (here), asking how to load modules that were packaged for remote module loading in a Silverlight out of browser application.
I created this sample a couple of months ago, and I thought might be useful for others. Here you can download the sample I put together using the Modularity QS from Prism 4. You can also download the necessary files separately (OOBModuleManager.cs and CachingXapModuleTypeLoader.cs)
The following are the highlights and steps to follow to run the sample:
- Open the solution is under PrismV4\Quickstarts\Modularity\Silverlight\ModularityWithUnity.
- Make sure the Web Site project is set as startup project.
- Open the CachingXapModuleTypeLoader and OOBModuleManager to see how they work. Also check out how the OOBModuleManager is registered in the Bootstrapper’s ConfigureContainer method.
- Run the application. Load all 6 modules.
- Install the application (add to Desktop and Start Menu).
- Close web browser and OOB window.
- Check in Systray that http://localhost:portX is not running. If it is, stop the site.
- Open OOB App from desktop.
- Load modules, they should load correctly.
Note: Modules B, D, E & F are loaded remotely, in background, not from main xap or however the Prism docs are explaining it (if you open Iso Storage you’ll find the .xap files there).
I hope this is useful for you in case you are required to implement this scenario.
Leave a comment
Your email address will not be published.