Jun 17, 2011 at 9:19 AM

Hi List,

i use the RegionPopupBehaviors.CreatePopupRegionWithName to create ModalDialogs.

I can use Buttons (Ok,Cancel) with commands but didn't found a way to react to the CloseButton of the Window?






Jun 17, 2011 at 3:31 PM
Edited Jun 17, 2011 at 3:45 PM

Hi Peter,

In the Stock Trader Rerence Implementation there is an implementation of RegionPopUpBehavior (one for Silverligth and other for WPF). The main difference between these two implementations is the control that they are displaying.

The Reference Implementation uses the RegionPopupBehavior for managing this and it is creating the PopupDialogActivationBehavior (Silverlight) and the WindowsDialogActivationBehavior (WPF).

Therefore, you could to create your own implementation of DialogActivationBehavior for achieving your scenario. In your particular case you could check the ContentDialogClosed event which is the event handler for the Closed action of the ContentDialog Window

For more information on this topic, you could take a look at the following code files:

  • StockTraderRI_Desktop\StockTraderRI.Infrastructure\Behaviors\RegionPopupBehavior.cs
  • StockTraderRI\StockTraderRI.Infrastructure\Behaviors\PopupDialogActivationBehavior.cs
  • StockTraderRI_Desktop\StockTraderRI.Infrastructure\Behaviors\WindowsDialogActivationBehavior.cs

I hope you find this information useful.


Miguel Bronzovic


Jun 17, 2011 at 4:28 PM


and thanks for the answer, but i'm not shure what you are talking about. I have a look to the Code but.....

Did you have an example???