I am working on a WPF/Prism 4/AvalonDoc application.
One of my views is very complicated and a ViewModel become huge and unmanagable. So I decided to split it to smaller views with their own ViewModels.
I have placed a region on the view and loading the sub-view into that region using regionManager.RegisterViewWithRegion method from "master" ViewModel constructor.
That works just as expected when only one instance of a view is loaded. But when I am opening second instance of that screen (it is loaded as DocumentContent into AvalonDock's DocumentPane) I am getting "View already exists in region" error.
I would like to avoid giving the region some unique name if possible. Is there a way to indicate that I am adding sub-view to specific instance of the "master" view? Any advise on how to do this?