I'm new to Prism, and I'm currently writing my first application using Prism's "region" concept. I currently have a Shell application that contains a single region, into which I display a view defined in a separate module. This view has two of its own regions, Subregion1 and Subregion2, which display two views defined in the module.
This is all working correctly, and the view and subviews are displaying in the proper location. However, when I attempt to find one of the subviews in any of the view's or subview's viewmodels (using regionManager.Regions["Subregion1"];), I am greeted with the error:
The region manager does not contain the SiteManager.SiteList region.
I initially thought that this might be a problem of having multiple instances of IRegionManagers, but most of the documentation I've read indicates that the global instance of IRegionManager is provided unless a scoped IRegionManager is specifically requested.
I've also tried various combinations of the static RegionManager.UpdateRegions() and RegionManager.SetRegionManager( .... ), to no avail.
Any ideas as to why the RegionManager isn't able to find the regions I'm requesting, even though I can register views to these regions without any problems?
EDIT: I'm attempting to access the regions in a command in the subviews's viewmodels.