Override Dockable Pane close

Sep 28, 2009 at 10:15 AM

How can I override the dockable dockable pane closed event?

I need to confirm closing on my forms.  Which I have working from a button on the form, but when the user presses X it just closes.

 

Thanks.

Sep 28, 2009 at 12:26 PM
Edited Sep 28, 2009 at 7:09 PM

Update: I have tried overriding the ad:DockablePane.CloseCommand in my user control, AND in the main window hoping that somewhere will intercept it, but it seems to be getting thrown and handled directly in the docking panel.

Has anyone encountered this issue?  Surely confirmation on close is a regular requirement.

 BTW.  I did consider using the Unloaded event of my  dockable content, which does work.  However, I need the ability to cancel the closure and unloaded is too late in the events for that.  I need something to occur before the unloaded with the ability to cancel.

Thanks