I'm a little new to PRISM, but I read the help documentation and can't figure out how to achieve the following (this is a WPF application).
I have a Shell (Window) in which there are two areas called "region1" and "region2". in the Initialize method of my one and only module, I register one view with each scope:
regionViewRegistry.RegisterViewWithRegion("Region1", typeof(View1)); regionViewRegistry.RegisterViewWithRegion("Region2", typeof(View1));
and when I run it, everything is fine when it creates 2 separate instances of View1 and places them in each area.
Now in View1 I have declared my own region for entering small child views
<ItemsControl Name="MainRegion" cal:RegionManager.RegionName="MainRegion" />
Now when I run my very simple PRISM application, I get the following exception message:
"A region with this name has already been registered: MainRegion"
which suggests that I cannot have multiple instances of the same view if that view declares its own scope.
Is it correct?
seems like a huge limitation.
I want my application to be very modular, as well as have an idea of ββother views (across regions), etc.
Or did I read the documentation incorrectly?
source share