Skip to main content

CustomDrawEventArgs.Handled Property

Gets or sets a value specifying whether an event was handled and that the default element painting is therefore not required.

Namespace: DevExpress.XtraGrid.Views.Base

Assembly: DevExpress.XtraGrid.v24.1.dll

NuGet Packages: DevExpress.Win.Grid, DevExpress.Win.Navigation

Declaration

public bool Handled { get; set; }

Property Value

Type Description
Boolean

true if the default element painting is not required; otherwise, false.

Remarks

If custom drawing is implemented and the Handled property value remains set to false, all the custom drawing performed will be overwritten by the default painting mechanism using the appearance settings. These appearance settings are specified by the CustomDrawEventArgs.Appearance property.

Set the Handled property to true to prevent the default painting mechanism from clearing any custom drawing after a custom draw event handler has been completed.

The CustomDrawEventArgs.DefaultDraw method, when called, automatically sets the Handled property to true.

The CustomDrawEventArgs.DefaultDraw method does nothing if the Handled property has already been set to true.

The following code snippets (auto-collected from DevExpress Examples) contain references to the Handled property.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

See Also