internal void WmPaint(ChartGraphics g) { Rectangle rect = new Rectangle(this.Left, this.Top, this.Width, this.Height); g.CreatePaintWindow(rect); try { if (this.Owner.Owner.Bars != null && this.Owner.Owner.Bars.Count > 0) { this.OnPaint(g); } } finally { g.RestorePaintWindow(); } }
internal void Paint(ChartGraphics g) { Rectangle rect = new Rectangle(this.Left, this.Top, this.Width, this.Height); g.CreatePaintWindow(rect); try { g.SetBackColor(this.BackColor); g.SelectBrush(this.BackColor); g.FillRectangle(0, 0, this.Width, this.Height); this.OnPaint(g); } finally { g.RestorePaintWindow(); } }