Exemplo n.º 1
0
        private void ProcessDockableContainer(TabStripPanel dockableContainer, RadDock dock, List <SplitPanel> splitPanelList, RadDockComponentFactory componentFactory)
        {
            DocumentTabStrip documentTabStrip = dockableContainer as DocumentTabStrip;

            if (documentTabStrip == null)
            {
                splitPanelList.Add(dockableContainer);
                return;
            }

            DocumentContainer documentContainer = this.CreateMainDocumentContainer(dock, componentFactory);

            if (documentContainer != null)
            {
                splitPanelList.Add(documentContainer);
            }

            dock.MainDocumentContainer.SplitPanels.Add(documentTabStrip);
        }
Exemplo n.º 2
0
        public List <SplitPanel> DeserializeNode(RadDock dock, RadSplitContainer splitContainer, RadDockComponentFactory componentFactory)
        {
            List <SplitPanel> splitPanelList = new List <SplitPanel>();

            TabStripPanel dockableContainer = this.CreateDockableContainer(this.Dockables, componentFactory);

            if (dockableContainer != null)
            {
                foreach (XmlDockable dockable in this.Dockables)
                {
                    TabPanel panel = dockable.Deserialize(dock, splitContainer, componentFactory);
                    dockableContainer.TabPanels.Add(panel);
                }
                this.ProcessDockableContainer(dockableContainer, dock, splitPanelList, componentFactory);
            }

            RadSplitContainer  childSplitContainer = null;
            IList <SplitPanel> tempList            = splitPanelList;

            if (XmlDockNode.HasBothChildren(this))
            {
                Orientation orientation = XmlDockNode.GetReversedOrientation(this);
                if (orientation != splitContainer.Orientation)
                {
                    childSplitContainer = this.CreateSplitContainer(dock, componentFactory);
                    if (childSplitContainer != null)
                    {
                        childSplitContainer.Orientation = orientation;
                        splitPanelList.Add(childSplitContainer);
                        tempList = childSplitContainer.SplitPanels;
                    }
                }
            }

            this.DeserializeChildNode(this.Left, splitContainer, childSplitContainer, tempList, componentFactory, dock);
            this.DeserializeChildNode(this.Right, splitContainer, childSplitContainer, tempList, componentFactory, dock);

            return(splitPanelList);
        }