This project is read-only.

Closed or Closing event is not firing

Sep 6, 2010 at 8:18 AM

Been working without success..


when i close the dockableContent x button the right corner, i need to find which content closed from closed event or closing..


Thanks in advance

Cheers :))

Mar 17, 2011 at 4:57 AM

(For anybody who is wondering about this)

You'll be needing these attributes on your dockableContent to receive those events - otherwise the content is just being hidden:

dockableContent.IsCloseable = true;
dockableContent.HideOnClose = false;




Mar 17, 2011 at 9:32 AM

The very simple code we use is as follows:

DockableContent d = new DockableContent();
d.HideOnClose = false;
d.Title = cmpModel.Label;
d.IsLocked = false;
d.GotFocus += new RoutedEventHandler(GotFocusEventFromAvalon);
d.Unloaded += new RoutedEventHandler(UnloadedEvemtFromAvalon);
d.Closing += new EventHandler<CancelEventArgs>(ClosingEventFromAvalon);
d.Closed += new EventHandler(ClosedEventFromAvalon);


Hope this helps

Bernard from Sofa, an AvalonDock wrapper.