Issues with dynamically loading modules in code with Silverlight/Prism
Posted
by Greg Bailey
on Stack Overflow
See other posts from Stack Overflow
or by Greg Bailey
Published on 2010-05-04T20:48:05Z
Indexed on
2010/05/05
16:28 UTC
Read the original article
Hit count: 395
Silverlight
|prism
In my Bootstrapper.cs in GetModuleCatalog, I need to specify the Module types using the typeof(ModuleType). In the example below I'm trying to load the Contact module on demand, but in order to get it into my module catalog, I need to have a reference to it in the project that holds my Bootstrapper. When I add a reference to Contact, then the Contact.dll gets added to the initial xap file, which defeats the purpose of loading the module dynamically. Am I missing something? Do you have to load the module catalog from a file to make this work?
var catalog = new ModuleCatalog();
catalog.AddModule(typeof(Core));
catalog.AddModule(typeof(Contact), InitializationMode.OnDemand);
© Stack Overflow or respective owner