Hi,
I have a wpf application using prism and mef.
In my Shell I have define ModuleRegion.
In moduleRegion, when I load ModuleA, ModuleAMainView is loaded. ModuleAMainView has nested region LeftRegion and RightRegion.
ModuleAMainViewModel is implementing INavigationAware interface.
When I try to access LeftRegion and RightRegion in OnNavigateTo function:-
var regionManager = ServiceLocator.Current.GetInstance<IRegionManager>();
var cregion = regionManager.Regions["LeftRegion"];
I get exception that region is not present.
regionManager contains only those regions which are defined in Shell.
Also if I try to call these line in UserControlLoaded event then I can see that regionManager has all the nested regions.
How to access these regions in OnNavigateTo functions.
Regards,
Sharda.
I have a wpf application using prism and mef.
In my Shell I have define ModuleRegion.
In moduleRegion, when I load ModuleA, ModuleAMainView is loaded. ModuleAMainView has nested region LeftRegion and RightRegion.
ModuleAMainViewModel is implementing INavigationAware interface.
When I try to access LeftRegion and RightRegion in OnNavigateTo function:-
var regionManager = ServiceLocator.Current.GetInstance<IRegionManager>();
var cregion = regionManager.Regions["LeftRegion"];
I get exception that region is not present.
regionManager contains only those regions which are defined in Shell.
Also if I try to call these line in UserControlLoaded event then I can see that regionManager has all the nested regions.
How to access these regions in OnNavigateTo functions.
Regards,
Sharda.