I seem to be struggling with dynamically showing and hiding views. I have an application that uses a Menu that has checkbox MenuItems. When the user checks the box the view is supposed to show up, unchecked it goes away. Pretty simple concept
but the implementation is eluding me.
I can brute force remove a view using this code:
IRegionManager regionManager = ServiceLocator.Current.GetInstance<IRegionManager>();
IRegion region = regionManager.Regions[regionName];
region.Remove(region.ActiveViews.First(x => x.ToString() == viewName));
and have tried a long series of combination to get the view to come back with no luck.
Any help would be greatly appreciated.