Show modal dialogs with subregions in Prism app

Topics: Prism v2 - WPF 3.5
Mar 14, 2010 at 6:54 PM
Edited Mar 14, 2010 at 6:58 PM

Hi all,

I couldn't find the best solution how to show a modal dialog with a  subregions inside it from a View(also with loading needed modules on demand for that new window).

I looked through a lot of samples, but they were too simple - just open a view as modal dialog(using behaviours) or just open a modal dialog using ShowDialog() method

from a View without any subregions.

Probably the steps should be like that:

1. Create a Window inside a Module(Project with a CustomControl type conatins Module implementation) and divide it into subregions as it was done in a shell.

2. Dynamically load new Modules that will register views with a subregions of that new modal window.

Am I right?

And I will be glad if someone can give me a sample of code how to implement that.

With best wishes,

Alexander.

Developer
Mar 17, 2010 at 7:02 PM

Hi Alexander,

Your approach should work, but it’s not necessary to afford the overhead of dynamically loading the modules in order to do that. You can check the RegionPopupBehaviors in the Reference Implementation. You can add subregions to popup windows shown through this behavior, but you should be careful with this issue.

I hope you find this helpful.

Guido Leandro Maliandi
http://blogs.southworks.net/gmaliandi