private void Grid_CellColorChanged(object sender, CellColorChangedEventArgs e) { using (Graphics g = gridPnl.CreateGraphics()) using (SolidBrush brush = new SolidBrush(e.Color)) { g.FillRectangle(brush, e.X, e.Y, e.Width, e.Height); g.DrawRectangle(Pens.White, e.X, e.Y, e.Width, e.Height); } }
protected void OnCellColorChanged(CellColorChangedEventArgs args) { CellColorChanged?.Invoke(this, args); }