How to .. Prism + MVVM + DI

Topics: Prism v4 - WPF 4
Oct 19, 2010 at 8:43 PM


I have a Shell which is defined in regions.

Modules get loaded into the contenet region.

Inside the module, I like to create multiple regions and inject the views. I took a look at the "View Injection Composition", but it will not work for me. Because, InitializeModules in Bootstrapper loads both the modules where as I will have only one module and load the user controls into the region.

Any help / thoughts will be appreciated.



Oct 19, 2010 at 9:21 PM


If your scenario requires to load modules on demand, you could take a look at following documentation section on MSDN:

For more information on this topic you could take a look at the Modularity Quickstart.

However, based on my understanding, the problem in your scenario is not strictly related to modularity, so I would recommend you to check the Navigation Quickstart. Since I think that you can find interesting how to manage more complex navigation scenarios.

On the other hand, take into account that when you expose a ContentControl as a region, it allows a maximum of one active view at a time (this view can contain the multiple regions).

Hope this helps.

Fernando Antivero



Oct 19, 2010 at 9:31 PM

Fernando, Thanks for the quick response. I will take a look at the Navigation Quickstart.