I have an AvalonDock DockingManager control with some child Anchorables (no Documents). If these Anchorables are floated from the main DockingManager, I'm aware they are still part of the DockingManager's logical tree.
However, I've had some requests from users that the floating windows be more independent from the main window by "disabling" some features:
I'm completely stumped as to how I could go about this, short of editing the AvalonDock source (which I'd rather not do given the option).
Is there a way to do either of these things?
Set the property Owner of a floating window to null to detach it from its logical parent.
{
dockManager.LayoutUpdated += DockManager_OnLayoutUpdated;
}
private void DockManager_OnLayoutUpdated(object sender, EventArgs e)
{
foreach (var floatingWindow in dockManager.FloatingWindows)
{
if (floatingWindow.Owner != null)
{
floatingWindow.Owner = null;
}
}
}
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