Hello.
I ran your OpenControls.Wpf.DockManagerDemo on my system (Windows 10, 20H2, 19042.1566, VS2019) and found a small problem with dragged document.
When I drag document within borders of MainWindow - all is ok.
When I drag document outside borders of MainWindow - new window will be created incorrectly. TabHeaderControl will have the wrong height.
I found two solutions to this problem.
- Need change order of these two lines:
|
floatingPane.Width = dockPane.ActualWidth; |
|
floatingPane.Height = dockPane.ActualHeight; |
In other words - at first need to setup Height, then setup Width.
It seems to me, it's a bad decision.
- It need to remove call of floatingPane.Show() from FloatingPaneManager.RegisterFloatingPane
floatingPane.EndDrag += FloatingPane_EndDrag;
// Ensure the window remains on top of the main window
floatingPane.Owner = Application.Current.MainWindow;
//floatingPane.Show(); //<--- REMOVE IT
}//FloatingPaneManager.RegisterFloatingPane
And need to add a call floatingPane.Show() at the end of DockPaneManager.Float
floatingPane.Left = cursorPositionOnScreen.X - 30;
floatingPane.Top = cursorPositionOnScreen.Y - 30;
floatingPane.Width = dockPane.ActualWidth;
floatingPane.Height = dockPane.ActualHeight;
floatingPane.Show(); // <---- ADD IT
}//DockPaneManager.Float
--
I'm sorry for mistakes in my English :)