Problems Removing Views from a Region

Topics: Prism v2 - Silverlight 3
Feb 19, 2010 at 5:08 PM

Hello:

In our nested trees of Regions (Regions holding Regions holding Regions), we have artifacts showing when we show a region a second time. 

Following this process:  1) we show a view in a nested region. 2) we remove the view. 3) We remove the region. 4) We show the region again and voila the old view is back!!!

In step 4, we are not asking to see the previous view, only the region, but the view is there.  We are scratching our head because not only did we remove the view, but we removed the old region. 

Why is this view still around?  We can see the RegionManager's list of regions after step 3 and this region is not in it's list.  Why then, when we recreate this region does this view show back up?

Are there any tips on how to inspect these kind of problems?  We're making sample apps, but we're not able to reproduce this problem because of it's specialized "Nested" nature.

Thanks for any help.

-Jeremiah

Feb 19, 2010 at 8:02 PM

We figured it out.

This is what happens when _RegionManager.RegisterViewWithRegion is called verses Region.Add

Thanks for reading.