/// <summary> /// Special logic that draws the borders for content /// </summary> private void CheckDockPosition() { Boolean isOnlyTab; DockContent dock = this.Parent as DockContent; if (dock == null || dock.Pane == null) { return; } if (dock.IsFloat) { isOnlyTab = this.CountPanels(false) == 1; if (isOnlyTab) { Borders = DockBorders.Left | DockBorders.Top | DockBorders.Right | DockBorders.Bottom; } else { Borders = DockBorders.Left | DockBorders.Top | DockBorders.Right; } } else { isOnlyTab = this.CountPanels(true) == 1; if (isOnlyTab) { Borders = DockBorders.Left | DockBorders.Bottom | DockBorders.Right; } else { Borders = DockBorders.Left | DockBorders.Right; } } }
/// <summary> /// Special logic that draws the borders for content /// </summary> private void CheckDockPosition() { Boolean isOnlyTab; DockContent dock = this.Parent as DockContent; if (dock == null || dock.Pane == null) return; if (dock.IsFloat) { DockBorders local; isOnlyTab = this.CountPanels(false) == 1; if (isOnlyTab) local = DockBorders.Left | DockBorders.Top | DockBorders.Right | DockBorders.Bottom; else local = DockBorders.Left | DockBorders.Top | DockBorders.Right; if (dock.Pane.HasCaption) local -= DockBorders.Top; Borders = local; } else { isOnlyTab = this.CountPanels(true) == 1; if (isOnlyTab) Borders = DockBorders.Left | DockBorders.Bottom | DockBorders.Right; else Borders = DockBorders.Left | DockBorders.Right; } }