Nov 29, 2011 at 5:32 PM
Edited Nov 29, 2011 at 5:40 PM
If your view is a FrameworkElement, you could directly get the view from the
Region and set the Visibility property of the view to Collapsed.
For example, if the view was injected in a Region with a name, you could do something similar to this:
IRegion region = regionManager.Regions["MyRegion"];
FrameworkElement view = region.GetView("MyView") as FrameworkElement;
view.Visibility = Visibility.Collapsed;
Also, you could get the view directly from the Views collection of the
Take into account that, depending of the type of Region where the view is hosted, you could also deactivate the view using the
Deactivate method of the Region instead of changing the
Visibility property of the view.
I hope you find this useful,