コード例 #1
0
        private DockWindow CreateDockWindow(RadDockComponentFactory componentFactory)
        {
            DockWindow dockWindow = null;

            if (this.Type == XmlDockable.DocumentPaneType)
            {
                dockWindow = componentFactory.CreateDocumentPane();
            }
            else if (this.Type == XmlDockable.ToolPaneType)
            {
                dockWindow = componentFactory.CreateToolPane();
            }
            else
            {
                DockState dockState = XmlDockable.ParseDockState(this.DockState);
                switch (dockState)
                {
                case Docking.DockState.TabbedDocument:
                    dockWindow = componentFactory.CreateDocumentPane();
                    break;

                case Docking.DockState.Floating:
                case Docking.DockState.Docked:
                case Docking.DockState.AutoHide:
                case Docking.DockState.Hidden:
                default:
                    dockWindow = componentFactory.CreateToolPane();
                    break;
                }
            }

            return(dockWindow);
        }
コード例 #2
0
        private DockState?GetFirstDockableState(List <XmlDockable> dockables)
        {
            DockState?dockState = null;

            if (dockables != null && dockables.Count > 0)
            {
                XmlDockable firstDockable = dockables[0];
                dockState = XmlDockable.ParseDockState(firstDockable.DockState);
            }

            return(dockState);
        }
コード例 #3
0
        private void ApplyDockWindowSettings(DockWindow dockWindow)
        {
            dockWindow.Text = this.Text;
            DockState dockState = XmlDockable.ParseDockState(this.DockState);

            if (dockState != Telerik.WinControls.UI.Docking.DockState.TabbedDocument)
            {
                dockWindow.DockState = dockState;
            }
            else
            {
                dockWindow.InnerDockState   = dockState;
                dockWindow.DesiredDockState = dockState;
            }
            dockWindow.Size = XmlDockable.ParseSize(this.PreferredDockSize);
        }