Active Document and Dockingmanager

Jan 7, 2009 at 10:11 PM
Hi Ado,

if you have multiple document types, and drag one document to a splitcontainer of dockingmanager, then document pane's selection_changed event don't catch the new 2nd document.

i've fixed this by adding these simple lines to dockingmanager class:

public event RoutedEventHandler ActiveDocumentChanged;

void DockingManager_ActiveDocumentChanged(object sender, RoutedEventArgs e){ }

in constructor:
this.ActiveDocumentChanged += new RoutedEventHandler(DockingManager_ActiveDocumentChanged);

and in the setter of ActiveDocument:

ActiveDocumentChanged(this,new RoutedEventArgs());

Probably a bit ugly solution, but I can now catch the ActiveDocumentChanged event by code.
Or did I oversee some other implemented solution.

Jan 12, 2009 at 8:22 PM
Hi, thanks for you feedback