示例#1
0
        private void ResetAutoHidePortion(DockState oldState, DockState newState)
        {
            if (oldState == newState || DockHelper.ToggleAutoHideState(oldState) == newState)
            {
                return;
            }

            switch (newState)
            {
            case DockState.DockTop:
            case DockState.DockTopAutoHide:
                AutoHidePortion = DockPanel.DockTopPortion;
                break;

            case DockState.DockLeft:
            case DockState.DockLeftAutoHide:
                AutoHidePortion = DockPanel.DockLeftPortion;
                break;

            case DockState.DockBottom:
            case DockState.DockBottomAutoHide:
                AutoHidePortion = DockPanel.DockBottomPortion;
                break;

            case DockState.DockRight:
            case DockState.DockRightAutoHide:
                AutoHidePortion = DockPanel.DockRightPortion;
                break;
            }
        }
示例#2
0
 private void AutoHide_Click(object sender, EventArgs e)
 {
     DockPane.DockState = DockHelper.ToggleAutoHideState(DockPane.DockState);
     if (DockHelper.IsDockStateAutoHide(DockPane.DockState))
     {
         DockPane.DockPanel.ActiveAutoHideContent = null;
         DockPane.NestedDockingStatus.NestedPanes.SwitchPaneWithFirstChild(DockPane);
     }
 }