public static class RegionManagerExtensions
{
public static void RemoveCurrentlyActiveAndThenAdd<TView>(
this IRegionManager regionManager,
string regionName)
{
var region = regionManager.Regions[regionName];
while (region.ActiveViews.Any())
region.Remove(region.ActiveViews.First());
var view = ServiceLocator.Current.GetInstance(typeof(TView));
regionManager.Regions[regionName].Add(view);
}
}
Тогда в вашем коде вы можете сделать: regionManager.RemoveCurrentlyActiveAndThenAdd<MyView)("MyRegion");