Back to Devexpress

PivotGridControl.CustomDrawFieldHeaderArea Event

windowsforms-devexpress-dot-xtrapivotgrid-dot-pivotgridcontrol-c8f91f6d.md

latest5.0 KB
Original Source

PivotGridControl.CustomDrawFieldHeaderArea Event

Enables header areas to be painted manually.

Namespace : DevExpress.XtraPivotGrid

Assembly : DevExpress.XtraPivotGrid.v25.2.dll

NuGet Package : DevExpress.Win.PivotGrid

Declaration

csharp
public event PivotCustomDrawHeaderAreaEventHandler CustomDrawFieldHeaderArea
vb
Public Event CustomDrawFieldHeaderArea As PivotCustomDrawHeaderAreaEventHandler

Event Data

The CustomDrawFieldHeaderArea event's data class is PivotCustomDrawHeaderAreaEventArgs. The following properties provide information specific to this event:

PropertyDescription
AppearanceGets the painted element’s appearance settings. Inherited from PivotCustomDrawEventArgs.
AreaGets a value which specifies the header area currently being painted.
BoundsGets the bounding rectangle of the painted element. Inherited from PivotCustomDrawEventArgs.
GraphicsGets an object used to paint an element. Inherited from PivotCustomDrawEventArgs.
GraphicsCacheGets an object which specifies the storage for the most used pens, fonts and brushes. Inherited from PivotCustomDrawEventArgs.
HandledGets or sets whether an event was handled, if it was handled the default actions are not required. Inherited from PivotCustomDrawEventArgs.
ThreadSafeArgsGets an event parameter that provides thread-safe access to event data.

The event data class exposes the following methods:

MethodDescription
DefaultDraw()Performs default painting of an element. Inherited from PivotCustomDrawEventArgs.

Remarks

The CustomDrawFieldHeaderArea event is raised before the header area is painted and allows it to be painted manually. The event parameter provides all the information necessary to paint an area. The PivotCustomDrawHeaderAreaEventArgs.Area property identifies the header area currently being painted.

Set the PivotCustomDrawEventArgs.Handled property to true to prohibit the default area painting.

Important Note : custom drawing of any kind is ignored when printing PivotGridControl.

To access event data while an asynchronous operation is being performed, use a thread-safe event parameter returned by the PivotCustomDrawHeaderAreaEventArgs.ThreadSafeArgs property. To learn more, see Asynchronous Mode.

Important

Do not change cell values, modify the control’s layout, or change the control’s object model in the events used for custom control painting. Actions that update the layout can cause the control to malfunction.

See Also

CustomDrawCell

CustomDrawEmptyArea

CustomDrawFieldHeader

CustomDrawFieldValue

PivotGridControl Class

PivotGridControl Members

DevExpress.XtraPivotGrid Namespace