/// <summary>
        /// Reads the documents for current document container
        /// </summary>
        /// <param name="documentContainer">The document container.</param>
        protected override void ReadDocuments(DocumentContainer documentContainer)
        {
            ValidateStackNotEmpty();

            XmlElement documentContainerElement = _elementStack.Peek();

            Validate.Assert <InvalidOperationException>(documentContainerElement.Name == "DocumentContainer");

            foreach (XmlElement documentElement in documentContainerElement.SelectNodes(@"Document").OfType <XmlElement>())
            {
                DockPane dockPane = new DockPane();
                _dockPaneReader(dockPane, documentElement.GetAttribute("Data"));
                documentContainer.AddDocument(dockPane);
            }
        }
        /// <summary>
        /// Splits and adds document to the split window
        /// </summary>
        /// <param name="pane">The pane</param>
        /// <param name="dockPoint">The dock point</param>
        private void SplitAndAddDocument(DockPane pane, ContentDockPoint dockPoint)
        {
            DocumentContainer container = new DocumentContainer();
            Grid splitGrid = null;

            switch (dockPoint)
            {
            case ContentDockPoint.Top:
                splitGrid = SplitVertically(false);
                Grid.SetRow(container, 0);
                break;

            case ContentDockPoint.Left:
                splitGrid = SplitHorizontally(false);
                Grid.SetColumn(container, 0);
                break;

            case ContentDockPoint.Right:
                splitGrid = SplitHorizontally(true);
                Grid.SetColumn(container, 2);
                break;

            case ContentDockPoint.Bottom:
                splitGrid = SplitVertically(true);
                Grid.SetRow(container, 2);
                break;

            case ContentDockPoint.Content:
                AddDocument(pane);
                return;

                break;

            default:
                break;
            }

            container.AddDocument(pane);
            splitGrid.Children.Add(container);
        }
        /// <summary>
        /// Reads the documents for current document container
        /// </summary>
        /// <param name="documentContainer">The document container.</param>
        protected override void ReadDocuments(DocumentContainer documentContainer)
        {
            ValidateStackNotEmpty();

            XmlElement documentContainerElement = _elementStack.Peek();
            Validate.Assert<InvalidOperationException>(documentContainerElement.Name == "DocumentContainer");

            foreach (XmlElement documentElement in documentContainerElement.SelectNodes(@"Document").OfType<XmlElement>())
            {
                DockPane dockPane = new DockPane();
                _dockPaneReader(dockPane, documentElement.GetAttribute("Data"));
                documentContainer.AddDocument(dockPane);
            }
        }
        /// <summary>
        /// Splits and adds document to the split window
        /// </summary>
        /// <param name="pane">The pane</param>
        /// <param name="dockPoint">The dock point</param>
        private void SplitAndAddDocument(DockPane pane, ContentDockPoint dockPoint)
        {
            DocumentContainer container = new DocumentContainer();
            Grid splitGrid = null;

            switch (dockPoint)
            {
                case ContentDockPoint.Top:
                    splitGrid = SplitVertically(false);
                    Grid.SetRow(container, 0);
                    break;
                case ContentDockPoint.Left:
                    splitGrid = SplitHorizontally(false);
                    Grid.SetColumn(container, 0);
                    break;
                case ContentDockPoint.Right:
                    splitGrid = SplitHorizontally(true);
                    Grid.SetColumn(container, 2);
                    break;
                case ContentDockPoint.Bottom:
                    splitGrid = SplitVertically(true);
                    Grid.SetRow(container, 2);
                    break;
                case ContentDockPoint.Content:
                    AddDocument(pane);
                    return;
                default:
                    break;
            }

            container.AddDocument(pane);
            splitGrid.Children.Add(container);
        }