ProgressBarAdv Events in Windows Forms Progress Bar (ProgressBarAdv)

The list of events and a detailed explanation about each of them is given in the following sections.

Events table

</table> ## DrawWaitingCustomRender event The CustomWaitingRender property indicates whether the waiting gradient will be replaced by another custom waiting render which is defaulted to segments. When this property is set to `true`, it enables the custom waiting render behavior which will fire this DrawWaitingCustomRender event. This event lets you do the desired drawing. If you perform custom drawing, you should specify that to the ProgressBarAdv (so that it does not perform it's default painting), by setting e.Handled = true. If no custom painting is done, then you do not have to set e.Handled value, and the ProgressBarAdv draws it's default segmented waiting gradient. The type of segments are specified through the ProgressFallBackStyle with the options Continuous, Tube, Gradient and System. ### Event data The event handler receives an argument of the type ProgressBarAdvDrawEventArgs containing data related to this event. The following ProgressBarAdvDrawEventArgs members provide information specific to this event. Member table
ProgressBarAdv events Description
DrawWaitingCustomRender This event can be handled to draw a custom waiting render. WaitingCustomRender must be set to `true`.td></tr>
ValueChanged This event is handled to set the text of the ProgressBarAdv when the value changes.The TextStyle property should be set to 'Custom'.
Members Description
Graphics Gets the graphic used to paint.
Handled Gets/sets a value indicating whether the DrawWaitingCustomRender event was handled.
Rectangle Gets the bounding rectangle.
private void progressBarAdv1_DrawWaitingCustomRender(object sender, Syncfusion.Windows.Forms.Tools.ProgressBarAdvDrawEventArgs e)

{

//Gets the graphics used to paint using the Graphics property

e.Graphics.PixelOffsetMode.ToString();



//If you perform custom drawing, you should specify that to the ProgressBarAdv 

//(so that it does not perform its default painting), by setting the below code.

e.Handled = true;



//To get the bounding rectangle use the below code

e.Rectangle.ToString();

}
Private Sub progressBarAdv1_DrawWaitingCustomRender(ByVal sender As Object, ByVal e As Syncfusion.Windows.Forms.Tools.ProgressBarAdvDrawEventArgs)



'Gets the graphics used to paint using the Graphics property

e.Graphics.PixelOffsetMode.ToString();



'If you perform custom drawing, you should specify that to the ProgressBarAdv 

'(so that it does not perform its default painting), by setting the below code.

e.Handled = true;



'To get the bounding rectangle use the below code

e.Rectangle.ToString();

End Sub
## ValueChanged event For information about this event, refer to the How to display custom text on the ProgressBarAdv to indicate the status of the task instead of the percentage completed? topic under the Frequently Asked Questions section.