Inter-Module Navigation

Topics: Prism v4 - WPF 4
Jul 15, 2011 at 2:51 AM

Hi, Im hoping you could help me with this problem.

I have my shell with only one main region, nothing more... Then I have one module which I call LayoutModule, in this module I have a LayoutView that I place on the main region of my shell. This LayoutView defines 2 new regions NavigationRegion and ContentRegion. I place another 2 Views corresponding to the last regions mentioned, I have these views in the LayoutModule (NavigationView and BackgroundView). All these views are placed using View Discovery. 

I can't figure out how to place a view from a different module in the ContentRegion.

I've tried RequestNavigate afterloading my background view on LAyoutModule, but it seems that contentRegion is not registered on the regionManager. The same problem when I use requestNAvigate on anotherModule trying to set a view from that module on the contentREgion

I've read a lot of documentation, but I think I'm missing something.

Could you point me in the right direction please.

Thanks for your time...

Jul 15, 2011 at 5:54 PM


The problem you're experiencing might be happening due to the fact that you're defining your content region inside a data template. That could cause your region not to be registered in the region manager, but still work when you use view discovery. Another possibility might be that you're placing that region in a control that does not have a parent in the visual tree (for example, placing it in a popup window, etc).

You might find the following threads useful, as they provide more information about the scenarios I mentioned:

Additionally, you could check to see if you can add views using view discovery from other modules. This could be useful to confirm that the problem might be related to the former.

If you continue experiencing these problems after following the suggestions described here and in the aforementioned threads, it would be helpful if you could provide us with a repro sample of your scenario, so that we can help you identify and solve your problem.

I hope you find this helpful.

Guido Leandro Maliandi