Background Settings in Windows Forms Gradient Label

27 Apr 20211 minute to read

This section illustrates the background settings of the GradientLabel control.

The GradientLabel control’s background can be customized using the various options provided by the BackgroundColor property given below.

GradientLabel Properties Description
BackgroundColor Gets / sets the background color and other styles.
Style Specifies the brush style.

Solid,

Pattern and

Gradient.

The default value is set to 'Gradient'.
BackColor Specifies the back color of the control.
ForeColor Specifies the fore color for any text or graphics in the control.
PatternStyle Specifies the pattern style of the control.
GradientStyle Specifies the gradient style of the background.

ForwardDiagonal,

BackwardDiagonal,

Horizontal,

Vertical,

PathRectangle and

PathEllipse.

The default value is set to 'Vertical'.
GradientColors Specifies the gradient colors.The first entry in this list will be the same as the BackColor property, the last entry will be the same as the ForeColor property.
this.gradientLabel1.BackgroundColor = new Syncfusion.Drawing.BrushInfo(Syncfusion.Drawing.GradientStyle.PathRectangle, new System.Drawing.Color[] {System.Drawing.Color.LavenderBlush, System.Drawing.Color.LemonChiffon, System.Drawing.Color.DarkKhaki, System.Drawing.Color.SandyBrown, System.Drawing.Color.LightSeaGreen});
Me.gradientLabel1.BackgroundColor = New Syncfusion.Drawing.BrushInfo(Syncfusion.Drawing.GradientStyle.PathRectangle, New System.Drawing.Color() {System.Drawing.Color.LavenderBlush, System.Drawing.Color.LemonChiffon, System.Drawing.Color.DarkKhaki, System.Drawing.Color.SandyBrown, System.Drawing.Color.LightSeaGreen})

Windows Forms GradientLabel Image604