We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

How to customize the appearance of the WaitingGradient style in the WinForms ProgressBarAdv?

Platform: WinForms |
Control: ProgressBarAdv

Customize the appearance of ProgressBarAdv

You can customize the appearance of the ProgressBarAdv when using the ProgressStyle as ProgressBarStyles.WaitingGradient. The customized ProgressBarStyle can be achieved by handling the event, DrawWaitingCustomRender, and enabling the property, CustomWaitingRender in the ProgressBarAdv.


//Specifies the ProgressBar style.
this.progressBarAdv1.ProgressStyle = Syncfusion.Windows.Forms.Tools.ProgressBarStyles.WaitingGradient;
//Customizes the waiting to render.
this.progressBarAdv1.CustomWaitingRender = true;
//Enables the waiting gradient.
this.progressBarAdv1.WaitingGradientEnabled = true;
//Customize the ProgressBar appearance.
this.progressBarAdv1.DrawWaitingCustomRender += new Syncfusion.Windows.Forms.Tools.ProgressBarAdvDrawEventHandler(progressBarAdv1_DrawWaitingCustomRender);
//Handles this event to draw a custom waiting to render.
void progressBarAdv1_DrawWaitingCustomRender(object sender, Syncfusion.Windows.Forms.Tools.ProgressBarAdvDrawEventArgs e)
    Region region = new System.Drawing.Region();
    LinearGradientBrush brush = new LinearGradientBrush( new Point(e.Rectangle.X, 0),
            new Point(e.Rectangle.X + e.Rectangle.Width, 0), Color.Blue, Color.Red);
    e.Graphics.FillRegion(brush, region);
    e.Handled = true;


' Specifies the ProgressBar style
Me.progressBarAdv1.ProgressStyle = Syncfusion.Windows.Forms.Tools.ProgressBarStyles.WaitingGradient
'Customizes the waiting to render.
Me.progressBarAdv1.CustomWaitingRender = True
'Enables the waiting gradient.
Me.progressBarAdv1.WaitingGradientEnabled = True
'Customizes the ProgressBar appearance.
AddHandler progressBarAdv1.DrawWaitingCustomRender, AddressOf progressBarAdv1_DrawWaitingCustomRender
'Handles this event to draw a custom waiting to render.
Private Sub progressBarAdv1_DrawWaitingCustomRender(ByVal sender As Object, ByVal e As Syncfusion.Windows.Forms.Tools.ProgressBarAdvDrawEventArgs)
    Dim region As Region = New System.Drawing.Region()
    Dim brush As New LinearGradientBrush(New Point(e.Rectangle.X, 0), New Point(e.Rectangle.X + e.Rectangle.Width, 0), Color.Blue, Color.Red)
    e.Graphics.FillRegion(brush, region)
    e.Handled = True
End Sub



The property named “WaitingGradientEnabled” helps to enable the waiting gradient style in the ProgressBarAdv.


Progress style specified as Waiting gradient

Figure 1: ProgressStyle specified as WaitingGradient

ProgressBar with custom draw in Waiting gradient style

Figure 2: ProgressBar with custom draw in WaitingGradient style


C#: ProgressBarAdv_CustomDraw_C#

VB: ProgressBarAdv_CustomDraw_VB

2X faster development

The ultimate WinForms UI toolkit to boost your development speed.
You must log in to leave a comment

Please sign in to access our KB

This page will automatically be redirected to the sign-in page in 10 seconds.

Up arrow icon

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile