Regions inside popup region

Topics: Prism v2 - WPF 3.5
May 26, 2009 at 1:26 AM


I'm using Prism V2 with the popup region from the WPF contrib project  (I adjusted it a little to make it work with V2). It was all working great untill I tried to add a tab region inside the popup region: one window will open up fine but the seccond will crash the app with the exception:

 "region with the given name is already registered: TabRegion"

The way I implemented it was to have the view that loads into the popup region contains the tabControl region. I understand why I get the exception too. Is there another way to implement tab region inside a popup window which will allow multiple windows to co-exists? 

Thank you,


May 26, 2009 at 8:35 PM

Hi Ken,


I don't know your exact implementation, but I guess that the exception is being thrown because you have two regions with the same name. If that is the reason of the exception, prism-v2 (prism-v1 as well) has the concept of scoped regions that  could help you with this issue: How to: Show a View in a Scoped Region


Moreover, you might find interesting the implementation of the RegionPopupBehaviors in the prism-v2 RI.


Hope it helps!


Matias Bonaventura

May 27, 2009 at 10:15 PM

Hi Matias,

Thank you! The scopedRegion actually did the work for me. As I'm loading diffrent modules to my scopedRegion I had to send the scopedRegionManager as part of an event parameter but it all worked fine.

Thank you,