public void Activate()
{
if (this.DockPanel == null)
this.Form.Activate();
else if (this.Pane == null)
this.Show(this.DockPanel);
else
{
this.IsHidden = false;
this.Pane.ActiveContent = this.Content;
if (this.DockState == DockState.Document && this.DockPanel.DocumentStyle == DocumentStyle.SystemMdi)
{
this.Form.Activate();
return;
}
else if (DockHelper.IsDockStateAutoHide(this.DockState))
this.DockPanel.ActiveAutoHideContent = this.Content;
if (!this.Form.ContainsFocus)
this.DockPanel.ContentFocusManager.Activate(this.Content);
}
}