Skip to main content
All docs
V24.2

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

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