I have two regions. A navigation region and a main region.
My navigation region contains two buttons which call the RequestNavigate method. The first button loads a view without any parameters
this.tRegionManager.RequestNavigate(RegionNames.MainRegion, ViewNames.VInfoMainViewUri);
The second button should load the same view with some parameters
this.tRegionManager.RequestNavigate(RegionNames.MainRegion, new Uri(ViewNames.VInfoMainViewUri.OriginalString + "" + query.ToString(), UriKind.Relative));
This works fine if no view is loaded. If any view is loaded, a click on any button causes nothing.
I tried to remove every active view from my region, but this causes an error
IViewsCollection col = tRegionManager.Regions[args.RegionName].Views;
foreach (var obj in col)
{
tRegionManager.Regions[args.RegionName].Remove(obj);
}
The region does not contain the specified view. Parameter name: view
How can I fix this probem?