using System.ComponentModel; using System.Drawing; namespace WeifenLuo.WinFormsUI.Docking { /// /// Dock window of Visual Studio 2012 Light theme. /// [ToolboxItem(false)] internal class VS2012DockWindow : DockWindow { /// /// Initializes a new instance of the class. /// /// The dock panel. /// State of the dock. public VS2012DockWindow(DockPanel dockPanel, DockState dockState) : base(dockPanel, dockState) { } public override Rectangle DisplayingRectangle { get { Rectangle rect = ClientRectangle; if (DockState == DockState.DockLeft) rect.Width -= DockPanel.Theme.Measures.SplitterSize; else if (DockState == DockState.DockRight) { rect.X += DockPanel.Theme.Measures.SplitterSize; rect.Width -= DockPanel.Theme.Measures.SplitterSize; } else if (DockState == DockState.DockTop) rect.Height -= DockPanel.Theme.Measures.SplitterSize; else if (DockState == DockState.DockBottom) { rect.Y += DockPanel.Theme.Measures.SplitterSize; rect.Height -= DockPanel.Theme.Measures.SplitterSize; } return rect; } } } }