private void RefreshActiveWindow()
            {
                if (DockPanel.Theme == null)
                {
                    return;
                }

                SuspendFocusTracking();
                m_inRefreshActiveWindow = true;

                DockPane     oldActivePane     = ActivePane;
                IDockContent oldActiveContent  = ActiveContent;
                IDockContent oldActiveDocument = ActiveDocument;

                SetActivePane();
                SetActiveContent();
                SetActiveDocumentPane();
                SetActiveDocument();
                DockPanel.AutoHideWindow.RefreshActivePane();

                ResumeFocusTracking();
                m_inRefreshActiveWindow = false;

                if (oldActiveContent != ActiveContent)
                {
                    DockPanel.OnActiveContentChanged(EventArgs.Empty);
                }
                if (oldActiveDocument != ActiveDocument)
                {
                    DockPanel.OnActiveDocumentChanged(EventArgs.Empty);
                }
                if (oldActivePane != ActivePane)
                {
                    DockPanel.OnActivePaneChanged(EventArgs.Empty);
                }
            }