Skip to main content

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

CustomDrawColumnHeaderEventArgs.CaptionRect Property

Gets the rectangle where the column caption is intended to be drawn.

Namespace: DevExpress.XtraTreeList

Assembly: DevExpress.XtraTreeList.v24.2.dll

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

#Declaration

public Rectangle CaptionRect { get; }

#Property Value

Type Description
Rectangle

A System.Drawing.Rectangle structure specifying the bounding rectangle of the header’s text.

#Remarks

By default, column headers can contain caption text and an image used to display sort order implemented by this column’s values. The TreeList.CustomDrawColumnHeader event facilitates your ability to paint these elements. It provides a CaptionRect and CustomDrawColumnHeaderEventArgs.SortShapeRect parameter properties which specify rectangles where mentioned elements are intended to be painted. Column header text is designed to be drawn to the left of column headers. The image indicating sort order is designed to be painted to the right of it.

See Also