Hi All,
I have an Infragistics TabGroupPane and I am using scoped regions (using Prism 4.1 with MEF) to display the same TabItemView (which has multiple regions in it) in different tabitems.
-My TabItemView, with nested regions, use ClearChildViewsRegionBehavior.ClearChildViews set to true.
-TabGroupPane is defined as a usercontrol which resides in a region named "TAB_REGION".
-Whenever I add a TabItem to the TabGroupPane, I create a new scoped regionmanger so that regions within the TabItemView are not registered to the main region manager using the following code:
scopedRegionManager = regionManager.Regions["TAB_REGION"].Add(tabItemView, null, true);
-I am *not* registering this scopedRegionManager with the MEF container, neither it is referenced by any part of the application.
-After adding 5 tabItems, I have 6 views in my "TAB_REGION".
-When I remove a TabItem, I also remove the TabItemView from "TAB_REGION". I have to do a UpdateRegion() and I can see that the TabItemView is removed from "TAB_REGION".
But I do have following questions/concerns:
1. Where are the scopedregionmanagers stored? Is there a collection of regionmanagers similar to one we have for Regions?
2. How can I access a scoped regionmanager if I want to in any part of the application?
3. How and when the scoped regionmanager is destroyed/disposed? And how can I ensure that the scoped regionmanager is disposed?
My main aim is to ensure that any scopedRegionManager created (whether or not assigned to a variable) is duly disposed.
Thanks
Comments: ** Comment from web user: RDV **
I have an Infragistics TabGroupPane and I am using scoped regions (using Prism 4.1 with MEF) to display the same TabItemView (which has multiple regions in it) in different tabitems.
-My TabItemView, with nested regions, use ClearChildViewsRegionBehavior.ClearChildViews set to true.
-TabGroupPane is defined as a usercontrol which resides in a region named "TAB_REGION".
-Whenever I add a TabItem to the TabGroupPane, I create a new scoped regionmanger so that regions within the TabItemView are not registered to the main region manager using the following code:
scopedRegionManager = regionManager.Regions["TAB_REGION"].Add(tabItemView, null, true);
-I am *not* registering this scopedRegionManager with the MEF container, neither it is referenced by any part of the application.
-After adding 5 tabItems, I have 6 views in my "TAB_REGION".
-When I remove a TabItem, I also remove the TabItemView from "TAB_REGION". I have to do a UpdateRegion() and I can see that the TabItemView is removed from "TAB_REGION".
But I do have following questions/concerns:
1. Where are the scopedregionmanagers stored? Is there a collection of regionmanagers similar to one we have for Regions?
2. How can I access a scoped regionmanager if I want to in any part of the application?
3. How and when the scoped regionmanager is destroyed/disposed? And how can I ensure that the scoped regionmanager is disposed?
My main aim is to ensure that any scopedRegionManager created (whether or not assigned to a variable) is duly disposed.
Thanks
Comments: ** Comment from web user: RDV **
Added a pictorial description of what I am trying to do