Completed
Last Updated: 15 Jan 2015 17:55 by ADMIN
ADMIN
George
Created on: 26 May 2014 08:36
Category: Dock
Type: Bug Report
1
FIX. RadDock - Docking a ToolWindow with other windows inside, docks only the current window
To reproduce:

Add a few ToolWindows to RadDock and start the application. Drag one window out of the form and dock the others inside of it. Dock the window back to the RadDock. You will notice that only the current window will be docked leaving the rest of the windows floating. The correct behavior is the whole window with its child windows to be docked.

Workaround:

Subscribe to the DockStateChanging and DockStateChanged events and manually add the windows.

private IEnumerable<DockWindow> windows;
void RadDock_DockStateChanging(object sender, DockStateChangingEventArgs e)
{
    if (e.NewWindow.FloatingParent == null)
    {
        this.windows = Enumerable.Empty<DockWindow>();
        return;
    }


    this.windows = DockHelper.GetDockWindows(e.NewWindow.FloatingParent, true, this.RadDock).Where(x => x != e.NewWindow);
}


void RadDock_DockStateChanged(object sender, DockWindowEventArgs e)
{
    foreach (DockWindow window in windows)
    {
        this.RadDock.DockWindow(window, e.DockWindow.DockTabStrip, DockPosition.Fill);
    }
}
0 comments