I'm developing a .NET 4.0 application using PRISM and MVVM, as well as WPF.
I currently have a shell subdivided in regions, with views inserted in them. When the user clicks on a button in one of the views, I would like a custom-made modal dialog to be displayed on top of all the views, but still within the same shell.
I looked at the StockTrader RI example and their implementation of the RegionPopupBehavior. Basically, they created a dependency property which allows them to define regions with a specific, custom-made behavior. The behavior is the one in charge of handling it's associated view's rendering, hence displaying it as a popup window.
The only downside to this approach is that all the other views are still active, so the popup isn't modal. I guess this can be resolved by manually disabling all un-needed regions in the shell, but I'm not sure how "clean" this is.
I was wondering if there were a better and simpler approach to displaying modal pop-up views in Prism ?
You might be interested in a custom PopupUserControl I have posted on my blog that behaves like that.
Usually I use it like this:
Although you can also just write the Content in the popup instead of binding the Content property