Overlayed dialog in Prism 5.0

Topics: Prism v4 - WPF 4
Apr 1, 2015 at 12:56 PM
How can I achieve the following appearance for modal dialogs in a Prism 5.0 based WPF desktop application? Here is the screenshot from the Prism 5 webpage:
https://i-msdn.sec.s-msft.com/dynimg/IC448590.png

However, the WPF based State-Based Navigation quickstart app looks like:
Image

Is it possible to do this with using InteractionRequestTrigger?
Apr 1, 2015 at 2:25 PM
It is possible to do with InteractionRequests, but with the current code base you would need to write your own custom behavior to do the presentation part as a windowless border and handle the background overlay as well. The built in one in WPF just uses a Window to create the dialog, thus the standard frame. I will put an issue in for this under our new code base at http://github.com/prismlibrary because it is a common request and hopefully we can fit it into a future release.
Apr 27, 2015 at 10:34 AM
Thanks for adding this as an issue!

Until the official solution, could you provide me some guidance about a possible implementation? The current PopupWindowAction class creates a wrapper window with a basic content and centers it over the parent view. What I would like to implement is a view with arbitrary content centered over the parent view. We have some basic implementation which uses regions with view-based navigation, but maintaining those regions for each view which needs this overlayed modal interactivity is a kind of overhead and not so elegant.

Thanks!
Apr 27, 2015 at 1:09 PM
The approach I have used in the past is to create a popup Window with no border to it and semi-transparent background, position that window over the content area (and handle window resize and move events to keep it there), and then have a content area in the middle of it (just a grid cell with a min height, width) that the dialog content gets placed in. So it is really just a small evolution of the current implementation to alter the appearance/size/positioning of the popup window.