Dialog workspace/region for Prism

Topics: Prism v4 - WPF 4
Oct 31, 2011 at 9:34 PM

I know this is probably a subject that has been discussed many times before, but I'm hoping that someone might have some new idea on it.

 

So what i would like to do:

in SCSF, there was a workspace add-on by infragistics that allowed you to define a workspace and when you gave the workspace a view, it would open it in a dialog.

So in Prism i would like to define a region, and for that region to open in a dialog window.

 

What I have tried

  • Dialog Service -  while I can understand having a service to open the 'browse/save/load' dialogs, it seem messy to me passing a view around to a service to be displayed
  • PopupRegionAdapter  - I wrote a popup region adapter and defined a popup in the shell with a region name. Now I can pass a View across  and it will open in the popup. this is more along the line that I think might work

 

I think that the region adapter is the way to go, but not extending the RegionAdapterBase class provided with the prism framework.

Has anyone done something along these lines before? or any hints or anything I should watch out for. Or am i barking up the wrong tree?

 

Any advice would be appreciated.

 

Thank you

Developer
Nov 1, 2011 at 4:46 PM

Hi,

You might find the WindowDialogActivationBehavior (for WPF) or the PopupDialogActivationBehavior (for Silverlight) included with the Stock Trader RI useful for this. Those behaviors allows you to define a region that, when a view is added to it, will be shown in a new window/popup.

Also, you might find the following threads useful where similar concerns are discussed:

I hope you find it useful,

Damian Cherubini
http://blogs.southworks.net/dcherubini