Enables a Pivot Grid Control’s background to be custom painted.
NuGet Package: DevExpress.Win.PivotGrid
public event PivotCustomDrawEventHandler CustomDrawEmptyArea
Public Event CustomDrawEmptyArea As PivotCustomDrawEventHandler
The CustomDrawEmptyArea event's data class is PivotCustomDrawEventArgs. The following properties provide information specific to this event:
|Appearance||Gets the painted element’s appearance settings.|
|Bounds||Gets the bounding rectangle of the painted element.|
|Graphics||Gets an object used to paint an element.|
|GraphicsCache||Gets an object which specifies the storage for the most used pens, fonts and brushes.|
|Handled||Gets or sets whether an event was handled, if it was handled the default actions are not required.|
|ThreadSafeArgs||Gets an event parameter that provides thread-safe access to event data.|
The event data class exposes the following methods:
|DefaultDraw()||Performs default painting of an element.|
Handle the CustomDrawEmptyArea event to custom paint the Pivot Grid Control’s empty area. This is the area which isn’t occupied by any rows. Set the event parameter’s PivotCustomDrawEventArgs.Handled property to true to disable default background painting. The other properties of the event parameter provide you with all the necessary information to paint the background.
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 PivotCustomDrawEventArgs.ThreadSafeArgs property. To learn more, see Asynchronous Mode.
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.