/// <inheritdoc/> protected override void OnPaint(PaintEventArgs e) { base.OnPaint(e); // Set the bounds of the selected tab, this should be moved out of the Paint loop var top = ShowTabs ? tab_strip.ScaledSize.Height : 0; var selected_tab = TabPages.FirstOrDefault(tp => tp.Selected); selected_tab?.SetBounds(0, top, ScaledSize.Width, ScaledSize.Height - top - 1); RenderManager.Render(this, e); }
private RibbonTabPage?GetPageFromTab(TabStripItem?item) => TabPages.FirstOrDefault(p => p.TabStripItem == item);