internal void RefreshChanges()
{
if (IsDisposed)
return;
if (VisibleNestedPanes.Count == 0)
{
ControlBox = true;
return;
}
for (int i=VisibleNestedPanes.Count - 1; i>=0; i--)
{
DockContentCollection contents = VisibleNestedPanes[i].Contents;
for (int j=contents.Count - 1; j>=0; j--)
{
IDockContent content = contents[j];
if (content.DockHandler.DockState != DockState.Float)
continue;
if (content.DockHandler.CloseButton && content.DockHandler.CloseButtonVisible)
{
ControlBox = true;
return;
}
}
}
//Only if there is a ControlBox do we turn it off
//old code caused a flash of the window.
if (ControlBox)
ControlBox = false;
}