Ejemplo n.º 1
0
        internal void SetContentBounds()
        {
            Rectangle rectContent = ContentRectangle;

            if (DockState == DockState.Document && DockPanel.DocumentStyle == DocumentStyle.DockingMdi)
            {
                rectContent = DockPanel.RectangleToMdiClient(RectangleToScreen(rectContent));
            }

            Rectangle rectInactive = new Rectangle(-rectContent.Width, rectContent.Y, rectContent.Width, rectContent.Height);

            foreach (IDockContent content in Contents)
            {
                if (content.DockHandler.Pane == this)
                {
                    if (content == ActiveContent)
                    {
                        content.DockHandler.Form.Bounds = rectContent;
                    }
                    else
                    {
                        content.DockHandler.Form.Bounds = rectInactive;
                    }
                }
            }
        }