module discovery /silverlight

Topics: Prism v4 - Silverlight 4
Oct 19, 2010 at 4:08 PM
Edited Oct 19, 2010 at 4:12 PM


I’m trying to follow region navigation silverlight quick start and my next issue is how silverlight modules are discovered:

I had ModulesCatalog.xml within my main project


<Modularity:ModuleCatalog xmlns=""




    <Modularity:ModuleInfoGroup Ref="OutOfOffice.Scheduler.xap" InitializationMode="WhenAvailable">

        <Modularity:ModuleInfo ModuleName="SchedulerModule"/>




In a bootstrapper there is an overridden CreateModuleCatalog() method :

protected override IModuleCatalog CreateModuleCatalog()



                Microsoft.Practices.Prism.Modularity.ModuleCatalog.CreateFromXaml(new Uri(ModuleCatalogUri,UriKind.Relative));



Unfortunalty Initialize() in my module SchedulerModule  isn’t called.



If I put

this.AggregateCatalog.Catalogs.Add(new AssemblyCatalog(typeof(OutOfOffice.Scheduler.SchedulerModule).Assembly));

within protected override void ConfigureAggregateCatalog() and add reference to module project in main project then module init is called.

The most annoying thing is tthat no exceptions are thrown.

What I’m missing?




Oct 20, 2010 at 6:55 PM

Hi Boris,

Nice to see that you started using Prism Region Navigation Quickstart. Based on my understanding, you have created a new module (SchedulerModule), but your application is not able to load this. So, this causes that the Intialize method, located in the Module Initializer class, will not be called. So I think that you can find interesting the following forum thread where user reported a similar scenario:

Please, take into account that in the aforementioned thread the user tried to load its module on demand, so you could avoid the step 3 over there.

Hope this helps.

Fernando Antivero