Quantcast
Channel: patterns & practices: Prism
Viewing all articles
Browse latest Browse all 1878

New Post: Load different modules in the same regions

$
0
0
Hi,

Your implementation is correct in which you import the RegionManager from the container. In addition, you would also need to import the RegionManager on each Module class so you may be able to register the Views into each Region when initializing the module.

When I mentioned that the RegionManager may be imported through constructor, I was referring to the following implementation although it basically behaves exactly as yours:
[ImportingConstructor]
public ModuleA(IRegionManager regionManager, IModuleManager moduleManager)
{
    RegionManager = regionManager;
    ModuleManager = moduleManager;
}
...
Then, you would successfully navigate through Master Views like you described, but Edit Views would need their corresponding RequestNavigate() on the MainRegion too.

For more information you can refer to the following MSDN Prism Guide chapters:

Regards,

Gabriel Ostrowsky.
https://blogs.southworks.net/gostrowsky

Viewing all articles
Browse latest Browse all 1878

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>