PRISM and adding multiple instances of same module

Topics: Prism v4 - WPF 4
Jun 19, 2010 at 11:32 AM

Hi all,

I'm using PRISM and the MVVM pattern for building a LOB application and at the moment I have predefined regions in the shell view, and all modules are loaded at startup and are displayed fine in their regions. This works great.

However, now I need more control over the way the views are shown. For example, I have a module CustomerManagement that can be activated more than once; and so its views should be displayed in for example a tab control on demand (and of course each view has its own view model). Or even better, instead of a tab control it would be great if the AvalonDock document pane could be used.

Can anyone explain how this can be done with PRISM?

Thanks!

Jul 1, 2010 at 6:17 PM

Hi,

Prism is not designed for loading multiples instances of the same module, but as far as I know there is no restrictions for doing something like that. However, it is not possible to unload or reload them.

Therefore, as you mentioned the necessity of controlling “views”, we thought your application would require to add, remove, activate, etc views from the RegionManager, so you can take a look at this forum thread, since this requirement was recently treated over there.

Please let me know if this helps.

Fernando Antivero
http://blogs.southworks.net/fantivero