BoldSignEasily embed eSignatures in your .NET applications. Free sandbox with native SDK available.
protected override void OnDraw(Graphics g, Rectangle clientRectangle, int rowIndex, int colIndex, GridStyleInfo style) { if (clientRectangle.IsEmpty) return; // CellLayout layout = GetCellLayout(int rowIndex, int colIndex, GridStyleInfo style) if(style.Tag is Bitmap) { int cellWidth = clientRectangle.Width; int cellHeight = clientRectangle.Height; int bmpWidth = ((Bitmap) style.Tag).Width; int bmpHeight = ((Bitmap) style.Tag).Height; int left = clientRectangle.X + (cellWidth - bmpWidth) / 2; int top = clientRectangle.Y + (cellHeight - bmpHeight) / 2; g.DrawImage((Bitmap) style.Tag, left, top, bmpWidth, bmpHeight); } }