Category / Section
How to apply the gradient color to WinForms ProgressBarAdv?
1 min read
Gradient color
You can apply gradient colors to the ProgressBarAdv by using the following steps to customize.
- Set the ProgressBarAdv style to Tube.
- Define the required color in TubeStartColor and TubeEndColor.
The following code example demonstrates the same.
C#
//Sets style to the ProgressBarAdv. this.progressBarAdv1.ProgressStyle = Syncfusion.Windows.Forms.Tools.ProgressBarStyles.Tube; //Specifies the start Tube color. this.progressBarAdv1.TubeStartColor = System.Drawing.Color.Lime; //Specifies the TubeEnd Color. this.progressBarAdv1.TubeEndColor = System.Drawing.Color.FromArgb(((int)(((byte)(127)))), ((int)(((byte)(146)))), ((int)(((byte)(242)))));
VB
'Sets style to the ProgressBarAdv. Me.progressBarAdv1.ProgressStyle = Syncfusion.Windows.Forms.Tools.ProgressBarStyles.Tube 'Specifies the start Tube color. Me.progressBarAdv1.TubeStartColor = System.Drawing.Color.Lime 'Specifies the TubeEnd Color. Me.progressBarAdv1.TubeEndColor = System.Drawing.Color.FromArgb((CInt(Fix((CByte(127))))), (CInt(Fix((CByte(146))))), (CInt(Fix((CByte(242))))))
Figure 1: Before specifying the TubeStartColor and TubeEndColor in the ProgressBarAdv
Figure 2: After specifying the TubeStartColor and TubeEndColor in the ProgressBarAdv
Samples: