Skip to main content
All docs
V24.2

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

CustomDrawEventArgs.Handled Property

Gets or sets whether the event is handled and allows you to prevent the control from drawing the visual element in its default appearance.

Namespace: DevExpress.XtraGantt

Assembly: DevExpress.XtraGantt.v24.2.dll

NuGet Package: DevExpress.Win.Gantt

#Declaration

public bool Handled { get; set; }

#Property Value

Type Description
Boolean

true if the event is handled; otherwise, false.

#Remarks

The following event arguments allow you to draw the visual element in its default appearance or suppress the default drawing:

  • The DefaultDraw() method—draws the visual element in its default appearance. You can call this method to first draw the visual element and then draw anything over it.

    Some visual elements may consist of several sub-elements. For example, a Gantt bar is made up of the bar itself, captions, dependency connections, and other sub-elements. Event arguments may contain methods that allow you to draw specific sub-elements. For example, the DrawBaseline() method allows you to draw a Gantt bar’s baseline. The DefaultDraw() method draws all sub-elements.

  • The Handled property—gets or sets whether you handled the event. If the event is handled, the control does not draw the visual element in its default appearance. If you call the DefaultDraw() method, the Handled property is automatically set to true.

See Also