Articles in this section
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.

  1. Set the ProgressBarAdv style to Tube.
  2. 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))))))

 

Before specifying the TubeStartColor and TubeEndColor

Figure 1: Before specifying the TubeStartColor and TubeEndColor in the ProgressBarAdv

After specifying the TubeStartColor and TubeEndColor

Figure 2: After specifying the TubeStartColor and TubeEndColor in the ProgressBarAdv

Samples:

C#: ProgressBarAdv_Multiple Colors_C#

VB: ProgressBarAdv_Multiple Colors_VB

Did you find this information helpful?
Yes
No
Help us improve this page
Please provide feedback or comments
Comments (0)
Please sign in to leave a comment
Access denied
Access denied