Modal Dialogs

Topics: Prism v2 - WPF 4, Prism v4 - WPF 4
Aug 31, 2010 at 11:45 AM


I've looked through a few threads and found the RI RegionPopupBehaviour for opening dialog windows but the solution just seems very convoluted. All I want is a have my module create a modal dialog with a view in it. Is the only option really to use the 4/5 classes required for RegionPopupBehaviour for such a simple concept? Could I just have a "CreateDialog" event that the shell subscribes to which dynamically creates a Window, adds a named region from the event parameters and then have the module register a view to that region?


Neil Alderson

Sep 3, 2010 at 9:03 PM

Hi Neil,

I do not know your exact scenario, but your approach seems to be possible. Take into account that Prism meant to be guidance, and not something strict, which you can not update.

Anyway, consider that the approaches that you will find in the Reference Implementations and Quickstarts are commonly the recommended by the product team.  

Additionally, you could take a look at the latest drop of Prism in the Navigation Quickstart, since it uses a more simpler approach though it does not use regions.

For more information on this topic, you could take a look the following article in the CHM:

  • MVVM Advanced Scenarios (new), see the Interaction Requests section.

Please let me know if this helps.

Fernando Antivero

Sep 3, 2010 at 11:11 PM

the behavior that is coded into this example is primarily geared towards silverlight development since "ChildWindow" is a silverlight control from what I have found in documentation unless you know of another way to do this.  Considering I love this idea of childwindows, but I fail to understand why just about ever example that has come out over the last 6 drops have pretty much all been in Silverlight.

While I appreciate the examples and I will be cross developing soon for silverlight for windows phone, I am primarily a wpf developer so, I feel like prism is being geared more towards silverlight with these examples.