protected override void OnPaint(PaintEventArgs e) { base.OnPaint(e); if (this.DockBackColor == BackColor) return; Graphics g = e.Graphics; var bgBrush = new SolidBrush(this.DockBackColor); g.FillRectangle(bgBrush, ClientRectangle); }