ColumnHeaderCustomDrawEventArgs.Info Property

Gets an object providing information necessary to paint a column header.

Namespace: DevExpress.XtraGrid.Views.Grid

Assembly: DevExpress.XtraGrid.v20.2.dll

Declaration

public GridColumnInfoArgs Info { get; }
Public ReadOnly Property Info As GridColumnInfoArgs

Property Value

Type Description
DevExpress.XtraGrid.Drawing.GridColumnInfoArgs

A DevExpress.XtraGrid.Drawing.GridColumnInfoArgs object providing appearance and state information about a column header.

Remarks

The returned object's InnerElements property represents a collection of elements displayed within the painted column header (sort glyph, filter button and column header image). Each element is represented by a DevExpress.Utils.Drawing.DrawElementInfo object which enables you to obtain the element's bounds. Elements can be recognized by the DevExpress.Utils.Drawing.DrawElementInfo.ElementPainter property type. See the GridCustomDraw demo for examples of using the InnerElements property.

The column header's current state (normal, pressed or hot-tracked) can be obtained via the State property.

The CustomDrawObjectEventArgs.Painter object's DrawObject method allows you to perform default element painting. This requires the Info property to be passed as the method's parameter. You can change properties of the Info object before calling the DrawObject method. In this case, the element will be painted using new settings. Alternatively, you can change the Info object's properties and leave the CustomDrawEventArgs.Handled property set to false. In this case, the element will also be painted using the new settings after executing the event handler.

See Also