protected override void OnPaint(PaintEventArgs e) { // paint the titlebar if (this.TitleBarRectangle.IntersectsWith(e.ClipRectangle)) { this.OnPaintTitleBar(e.Graphics); } }