CB
Clay Burch
Syncfusion Team
August 20, 2002 08:31 PM UTC
One thing you could try is to create a bitmap that has the gradient that you want to see, and then set this bitmap as the backgroundimage. Here are some code snippets.
int width = this.gridControl1.Bounds.Width;
int height = this.gridControl1.Bounds.Height;
Bitmap bm = new Bitmap(width, height);
Graphics g = Graphics.FromImage(bm);
LinearGradientBrush brush = new LinearGradientBrush(this.gridControl1.Bounds,
Color.FromArgb(255, 250, 200), Color.FromArgb(128, 20, 20), LinearGradientMode.BackwardDiagonal);
g.FillRectangle(brush, 0, 0, width, width);
this.BackgroundImage = bm;
gridControl1.SupportsTransparentBackColor = true;
gridControl1.BackColor = Color.FromArgb(25, 204, 212, 230 );
gridControl1.TableStyle.Interior = new Syncfusion.Drawing.BrushInfo(Color.FromArgb(50, 204, 212, 230));
gridControl1.Properties.BackgroundColor = Color.FromArgb(0, 204, 212, 230 );
One thing you would probably need to do is to resize (re-create) the bitmap whenever the grid is resized.
TP
Tony Perkins
August 22, 2002 01:21 PM UTC
Worked like a champ. Thanks!