0
votes

I have a TabControl and I am creating a new scoped region manager for every tabItem which holds the same usercontrol (which has nested regions in it): regionManager.Regions["TAB_REGION"].Add(theView, null, true);

[I am not assigning any variable to the new scoped regionmanager. Also, theView is NonShared and is created for each tabItem and contains some regions Also theView has prism:ClearChildViewsRegionBehavior.ClearChildViews="True"].

  1. Is there a collection which holds all region managers created for the application? The one similar to IRegionCollection which holds all regions in the given RegionManager. -If yes, how can I access it?
  2. When are the scoped regionmanagers destroyed/removed from memory?
  3. Can user destroy/remove scoped regionmanagers while application is still running?
  4. When I close a tabItem (using a 'X' button), I remove the view using the code: regionManager.Regions["TAB_REGION"].Remove(theView). I verified that the view is removed from the "TabRegion". Is there a way I can verify that the associated scoped regionmanager is also removed from memory, in case it is supposed to be?

Please let me know if I can provide more information.

1

1 Answers