Apr 29, 2009 at 8:09 PM
Edited Apr 29, 2009 at 8:11 PM
This is the intended behavior of the
Remove() method. That is because, in case you have manually set a
RegionManager to your view (instead of using the overload of the Region that does this) , perhaps you do not want to lose it “automatically” when calling this method.
To clear the property manually you can do something like this:
DependencyObject dependencyObject = currentView as DependencyObject;
if (dependencyObject != null)
dependencyObject.ClearValue(RegionManager.RegionManagerProperty); // IRegionManager viewRegionManager = RegionManager.GetRegionManager(view); viewRegionManager will
Please let me know if this helps.