RegionPopupBehaviors - Close popup programmatically?

Topics: Prism v2 - WPF 3.5
Feb 19, 2009 at 2:52 PM

Just started looking at the RegionPopupBehaviors in drop 10.  When we need to make a WCF call to get some application settings I’d like to display a popup like the one shown in the RI that will show progress status and overlays the main window/shellregion so as  to put us in a pseudo modal state while we wait for the WCF call to complete.  

Skimming through the code it is not clear to me how I would close this popup programmatically, that is when the WCF call has completed I want to be able to close the popup.  Depending on how we implement this would like to be able to do this from either (a) within the view that is hosted in the popup or (b) from outside the popup window code for the case where I kick of the WCF call, show the popup, when the WCF call completes, get hold of the popup and ask it to close.  Sure I have missed something obvious ..



Feb 19, 2009 at 6:30 PM

Ah – was looking at the implementation details of the Behavior classes too closely before trying it out.  Simply removing my view from the popup region seems to do what I need.