Hello,
I am displaying a number of floating ToolWindows at runtime that can also be docked by the user. What I can't understand, is how to keep the size (width or height depending if it's docked on left/right or top/bottom) that the ToolWindow has when floating, when it's docked.
At the moment I tried achieving this using the following
private void DockSite_WindowStateChanged(object sender, DockingWindowStateChangedEventArgs e)
{
if (e.NewValue == DockingWindowState.Docked)
{
UserControl uc = (e.Window.Content as UserControl);
DockSite.SetControlSizeForState(e.Window, uc.RenderSize, DockingWindowState.Docked);
}
}
But to no avail; if I debug the code, I can see that the values are correctly set by calling GetControlSizeForState, but what is on screen is different.
How can I solve this?
Thanks