WindowRegionAdapter, PopupWindowAction, PopupModalAction, etc. - which one should be used?

Topics: Prism v4 - Silverlight 4, Prism v4 - WPF 4
Dec 14, 2012 at 8:05 PM

WindowRegionAdapter has been around for sometime now. I used it and liked it. What's your favorite way of creating Popup windows (modal and modaless). Any comments are very much appreciated.

Dec 17, 2012 at 7:31 PM


I believe that the approach to be used to show a popup window will depend on the preferences of each developer and the requirements of each scenario.

In my case, when I need to show a popup window that is related to an specific view and it's not required to reuse that popup in other parts of the application, I tend to use a PopupChildWindowAction for Silverlight. For WPF, I use a custom PopupWindowAction (which you can find in one of my blog posts) which provides similar capabilities for WPF.

On the other hand, if a want to show in a popup a view that could be reused by several parts of my application, or just navigated to from several locations, I tend to use the PopupDialogActivationBehavior (for Silverlight) or the WindowDialogActivationBehavior (for WPF) defined in the Stock Trader RI, as they allows you to define a Region that will show its view in a popup.

Again, there isn't a better approach. Which one you should use would depend mostly of what you want to do and your personal preferences. Hence, these are not recommendations, but more like my personal preferences on the subject.


Damian Cherubini