Пример #1
0
        /// <summary>
        /// Close this content without notifications
        /// </summary>
        internal void InternalClose()
        {
            DockingManager manager = Manager;

            DocumentPane         parentPane         = ContainerPane as DocumentPane;
            FloatingDocumentPane floatingParentPane = ContainerPane as FloatingDocumentPane;

            if (floatingParentPane != null)
            {
                floatingParentPane.RemoveContent(0);
                if (floatingParentPane.FloatingWindow != null &&
                    !floatingParentPane.FloatingWindow.IsClosing)
                {
                    floatingParentPane.FloatingWindow.Close();
                }
            }
            else if (parentPane != null)
            {
                parentPane.Items.Remove(this);

                parentPane.CheckContentsEmpty();
            }

            if (manager != null)
            {
                if (manager.ActiveContent == this)
                {
                    manager.ActiveContent = null;
                }

                if (manager.ActiveDocument == this)
                {
                    manager.ActiveDocument = null;
                }
            }
        }