This is a migrated thread and some comments may be shown as answers.

problems trying to use radwindow with prism

0 Answers 24 Views
Window
This is a migrated thread and some comments may be shown as answers.
Rob Vest
Top achievements
Rank 1
Rob Vest asked on 19 Dec 2020, 08:00 PM

I am having a problem getting my Telerik RadWindow to add modules to my module catalog. To get the RadWindow to load I had to override the Prism CreateShell method to return null.

protected override Window CreateShell() { //We must return null to override Window type.//return Container.Resolve<ShellWindow>();return null; }

I then handle all the initialization in the OnInitialized method.

protected override void OnInitialized() { ShellWindow2 shellWindow = Container.Resolve<ShellWindow2>(); shellWindow.Show(); MainWindow = shellWindow.ParentOfType<Window>(); RegionManager.SetRegionManager(MainWindow, Container.Resolve<IRegionManager>()); RegionManager.UpdateRegions(); InitializeModules(); base.OnInitialized(); }
My problem is when I try to add modules to my Module Catalog I get an error : The region manager does not contain the MyRegion region.
protected override void ConfigureModuleCatalog(IModuleCatalog moduleCatalog) { moduleCatalog.AddModule<SecurityModule>(); }

I think the problem is the module is trying to map to a region before the RegionManager is initialized in the OnInitialized method.

How can get the AddModule method to initialize after the RegionManager is set up?


No answers yet. Maybe you can help?

Tags
Window
Asked by
Rob Vest
Top achievements
Rank 1
Share this question
or