public ViewHostTab(ViewHostTabs tabs, ViewBase view) : base(view, tabs.Side) { Verify.Argument.IsNotNull(tabs, nameof(tabs)); Tabs = tabs; _viewHost = tabs.ViewHost; Buttons = new ViewButtons(tabs); if (_viewHost.IsDocumentWell) { Buttons.SetAvailableButtons(ViewButtonType.Close); } Buttons.Height = Renderer.TabHeight + Renderer.TabFooterHeight; Buttons.ButtonClick += OnButtonClick; }
public override void RenderViewHostTabsBackground(ViewHostTabs tabs, PaintEventArgs e) { var graphics = e.Graphics; using (var brush = new SolidBrush(ColorTable.ViewHostTabsBackground)) { graphics.FillRectangle(brush, e.ClipRectangle); } if (tabs.ViewHost.IsDocumentWell) { using (var brush = new SolidBrush( tabs.ViewHost.IsActive ? ColorTable.ViewHostTabsSelectedBackgroundActiveEnd : ColorTable.ViewHostTabsSelectedBackgroundNormalEnd)) { var rc = new RectangleF( -0.5f, -0.5f + Constants.TabHeight, tabs.Width + 1, Constants.TabFooterHeight + 1); var ltCorner = ((tabs.LeftButtons == null || tabs.LeftButtons.Width == 0) && tabs[tabs.FirstTabIndex].IsActive) ? 0 : 2; graphics.FillRoundedRectangle(brush, rc, ltCorner, 2, 0, 0); } } }
public abstract void RenderViewHostTabsBackground(ViewHostTabs tabs, PaintEventArgs e);