Implements base docking element functionality.
Inheritance: System.ComponentModel.Component, IDockingElement
コード例 #1
0
ファイル: KryptonDockingManager.cs プロジェクト: yp25/Krypton
        private void RemoveControlStorePages(DockingElement element, string[] uniqueNames, bool autoHidden, bool docked)
        {
            // Find the control element from the provided starting point
            KryptonDockingControl control = element as KryptonDockingControl;
            if (control == null)
                control = element.GetParentType(typeof(KryptonDockingControl)) as KryptonDockingControl;

            // If we managed to find a docking control element to work with
            if (control != null)
            {
                // Enumerate all the child elements
                foreach (IDockingElement child in control)
                {
                    // We are only interested in the edge elements
                    KryptonDockingEdge edge = child as KryptonDockingEdge;
                    if (edge != null)
                    {
                        // Do we need to clear auto hidden elements?
                        if (autoHidden)
                        {
                            KryptonDockingEdgeAutoHidden autoHiddenEdge = edge["AutoHidden"] as KryptonDockingEdgeAutoHidden;
                            if (autoHiddenEdge != null)
                                autoHiddenEdge.PropogateAction(DockingPropogateAction.ClearStoredPages, uniqueNames);
                        }

                        // Do we need to clear docked elements?
                        if (docked)
                        {
                            KryptonDockingEdgeDocked dockedEdge = edge["Docked"] as KryptonDockingEdgeDocked;
                            if (dockedEdge != null)
                                dockedEdge.PropogateAction(DockingPropogateAction.ClearStoredPages, uniqueNames);
                        }
                    }
                }
            }
        }