Exemple #1
0
 private void gridViewDiem_CustomDrawRowIndicator(object sender, RowIndicatorCustomDrawEventArgs e)
 {
      e.Handled = true;
     SolidBrush brush = new SolidBrush(Color.FromArgb(0xC6, 0x64, 0xFF));
     e.Graphics.FillRectangle(brush, e.Bounds);
     e.Graphics.DrawRectangle(Pens.Black, new Rectangle(e.Bounds.X, e.Bounds.Y, e.Bounds.Width - 1, e.Bounds.Height));
     Size size = ImageCollection.GetImageListSize(e.Info.ImageCollection);
     Rectangle r = e.Bounds;
     ImageCollection.DrawImageListImage(e.Cache, e.Info.ImageCollection, e.Info.ImageIndex,
             new Rectangle(r.X + (r.Width - size.Width) / 2, r.Y + (r.Height - size.Height) / 2, size.Width, size.Height));
     brush.Dispose();
 }