Hi I was wondering if I could undock all DocumentContents of a DocumentPan programmatically .
any Suggestions?
Thank you.
I've spend couple of hours on this problem and found following solution. I downloaded avalon's source code and modified it. I've made two modifications. The first one in DocumentPane class:
public void UnDock(DockableContent content)
{
DockingManager manager = GetManager();
Point point = this.PointToScreenDPI(new Point(0, 0));
manager.Drag(content, point, new Point(0, 0));
manager.CompleteDragging(point);
}
And the second, I extent visibility of CompleteDragging method from private to internal.
Usage of UnDock is quite simple:
dockumentPane1.UnDock(dockablePane1.Items[0] as DockableContent);
Of course DocumentPane should contain some DockableContent and it should be exactly DockableContent not DocumentContent. It seems work fine for me ;)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With