Based on my understanding, you would like to move an active View from one Region to another, and erase it from the first one.
Therefore, you could use a button to fire a moveView command and then, the commandHandler would remove the activeView from the first Region, and add it on the second one.
The CommandHandler implementation may look like this:
If the View you would move is not active, then you would look for it in the Region's Views list and RequestNavigate() on the First Region would not be needed.
I hope this helps,
Regards.
Gabriel Ostrowsky
https://blogs.southworks.net/gostrowsky
Therefore, you could use a button to fire a moveView command and then, the commandHandler would remove the activeView from the first Region, and add it on the second one.
The CommandHandler implementation may look like this:
publicvoid MoveViewCommandHandler() { var viewToMove = this.regionManager.Regions["FirstRegion"].ActiveViews.FirstOrDefault(); // Navigate on First region in order to load a View after the active View is movedthis.regionManager.Regions["FirstRegion"].RequestNavigate(new Uri("MainDefaultView", UriKind.Relative)); this.regionManager.Regions["FirstRegion"].Remove(viewToMove); // Adding the View into the Second Regionthis.regionManager.Regions["SecondRegion"].add(viewToMove); this.regionManager.Regions["SecondRegion"].RequestNavigate(New Uri("MyMovedView", UriKind.Relative)); }
I hope this helps,
Regards.
Gabriel Ostrowsky
https://blogs.southworks.net/gostrowsky