internal void CloseContent(IDockContent content)
{
DockPanel dockPanel = this.DockPanel;
if (content == null)
return;
if (!content.DockHandler.CloseButton)
return;
dockPanel.SuspendLayout(true);
try
{
if (content.DockHandler.HideOnClose)
{
content.DockHandler.Hide();
this.NestedDockingStatus.NestedPanes.SwitchPaneWithFirstChild(this);
}
else
content.DockHandler.Close();
}
finally
{
dockPanel.ResumeLayout(true, true);
}
}