IsDockStateAutoHide() public static method

public static IsDockStateAutoHide ( DockState dockState ) : bool
dockState DockState
return bool
Example #1
0
        /// <exclude/>
        protected override void OnTextChanged(EventArgs e)
        {
            if (m_hiddenMdiChild != null)
            {
                m_hiddenMdiChild.Text = this.Text;
            }
            if (DockHelper.IsDockStateAutoHide(DockState))
            {
                DockPanel.RefreshAutoHideStrip();
            }
            else if (Pane != null)
            {
                if (Pane.FloatWindow != null)
                {
                    Pane.FloatWindow.SetText();
                }
                Pane.RefreshChanges();
            }

            base.OnTextChanged(e);
        }
Example #2
0
        private Rectangle GetLogicalTabStripRectangle(DockState dockState, bool transformed)
        {
            if (!DockHelper.IsDockStateAutoHide(dockState))
            {
                return(Rectangle.Empty);
            }

            int leftPanes   = GetPanes(DockState.DockLeftAutoHide).Count;
            int rightPanes  = GetPanes(DockState.DockRightAutoHide).Count;
            int topPanes    = GetPanes(DockState.DockTopAutoHide).Count;
            int bottomPanes = GetPanes(DockState.DockBottomAutoHide).Count;

            int x, y, width, height;

            height = MeasureHeight();
            if (dockState == DockState.DockLeftAutoHide && leftPanes > 0)
            {
                x     = 0;
                y     = (topPanes == 0) ? 0 : height;
                width = Height - (topPanes == 0 ? 0 : height) - (bottomPanes == 0 ? 0 :height);
            }
            else if (dockState == DockState.DockRightAutoHide && rightPanes > 0)
            {
                x = Width - height;
                if (leftPanes != 0 && x < height)
                {
                    x = height;
                }
                y     = (topPanes == 0) ? 0 : height;
                width = Height - (topPanes == 0 ? 0 : height) - (bottomPanes == 0 ? 0 :height);
            }
            else if (dockState == DockState.DockTopAutoHide && topPanes > 0)
            {
                x     = leftPanes == 0 ? 0 : height;
                y     = 0;
                width = Width - (leftPanes == 0 ? 0 : height) - (rightPanes == 0 ? 0 : height);
            }
            else if (dockState == DockState.DockBottomAutoHide && bottomPanes > 0)
            {
                x = leftPanes == 0 ? 0 : height;
                y = Height - height;
                if (topPanes != 0 && y < height)
                {
                    y = height;
                }
                width = Width - (leftPanes == 0 ? 0 : height) - (rightPanes == 0 ? 0 : height);
            }
            else
            {
                return(Rectangle.Empty);
            }

            if (!transformed)
            {
                return(new Rectangle(x, y, width, height));
            }
            else
            {
                return(GetTransformedRectangle(dockState, new Rectangle(x, y, width, height)));
            }
        }