multiple instance same module

Topics: Prism v4 - WPF 4
Jul 28, 2011 at 10:17 PM

I was just wondering. Is it possible to configure prism to load the same module twice, but with different settings.

For example: A map module, it has a map view that displays a map. The user could load the module the first time so he can see an entire county, and load the second time so he can be zoomed to a city. Both modules - views would be on the screen at the same time.

So basically all the code would be identical ( because it is the same module ), but the user could have two sets of configuration data that tell the module what to display.

 

Developer
Jul 29, 2011 at 6:16 PM

Hi,

In Prism, modules are not intended to be loaded more than once. However, after you have loaded a module, the view and all the components that you require to fulfill your use case (e.g. a viewmodel) can be instantiated more than once, so you can launch your components multiple times with different settings.

I hope you find this helpful.

Guido Leandro Maliandi
http://blogs.southworks.net/gmaliandi