Skip to main content

CustomDrawEventArgs.Graphics Property

A GDI+ drawing surface. Use the CustomDrawEventArgs.Cache property instead if you enable the DirectX hardware acceleration.

Namespace: DevExpress.XtraGrid.Views.Base

Assembly: DevExpress.XtraGrid.v24.1.dll

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


public Graphics Graphics { get; }

Property Value

Type Description

A Graphics object providing a means for painting.


The Graphics property returns an object representing the painting surface and providing a means to paint. When custom painting, you can use methods and properties of this object to paint text, graphics primitives and images. Note that painted elements must reside within the area specified by the CustomDrawEventArgs.Bounds property. Otherwise, they will overlap other elements within the control.

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


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