protected virtual void Dispose(bool disposing)
        {
            if (m_disposed)
            {
                return;
            }

            m_disposed = true;

            if (disposing)
            {
                Contents.Dispose();
                if (TabWindowDock != null)
                {
                    TabWindowDock.Dispose();
                }
                if (TabWindowFloat != null)
                {
                    TabWindowFloat.Dispose();
                }
                if (TabWindowDocument != null)
                {
                    TabWindowDocument.Dispose();
                }
                Events.Dispose();

                if (DockManager != null)
                {
                    DockManager.RemoveContentWindow(this);
                    m_dockManager = null;
                }
            }
        }
        internal void SetParent(Control control)
        {
            TabWindow tabWindow = TabWindow;

            if (TabWindowDock != null)
            {
                TabWindowDock.SetParent(null);
            }
            if (TabWindowDocument != null)
            {
                TabWindowDocument.SetParent(null);
            }
            if (TabWindowFloat != null)
            {
                TabWindowFloat.SetParent(null);
            }

            if (tabWindow != null)
            {
                tabWindow.SetParent(control);
            }
        }