Skip to main content
A newer version of this page is available. .

TabbedGroup.CustomDrawHeaderButton Event

Allows you to custom paint header buttons (TabbedGroup.CustomHeaderButtons).

Namespace: DevExpress.XtraLayout

Assembly: DevExpress.XtraLayout.v21.1.dll

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

Declaration

[DXCategory("Appearance")]
public event HeaderButtonCustomDrawEventHandler CustomDrawHeaderButton

Event Data

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

Property Description
Bounds Gets the rectangle that specifies the bounds of the header button.
Button Gets the button that is being drawn.
Cache Provides access to the drawing surface and a cache of pens, fonts, and brushes. Inherited from ObjectCustomDrawEventArgs.
Graphics Provides access to the drawing surface. Inherited from ObjectCustomDrawEventArgs.
Handled Gets or sets whether the event is handled and prevents the default draw operation from being performed. Inherited from ObjectCustomDrawEventArgs.
Info Provides access to the object that contains information about the button being drawn.
Painter Provides access to the object that performs paint operations. Inherited from ObjectCustomDrawEventArgs.

The event data class exposes the following methods:

Method Description
DefaultDraw() Draws the visual element according to the default algorithm.

Remarks

The CustomDrawHeaderButton event allows you to custom paint header buttons (TabbedGroup.CustomHeaderButtons). The Button event parameter idenfies the currently processed button.

To draw custom information, use the methods provided by the Cache or Graphics event parameter.

When you handle the CustomDrawHeaderButton event, you can invoke the button’s default rendering with the DefaultDraw method.

Set the Handled event parameter to true to indicate that you have handled the CustomDrawHeaderButton event and no default painting is required after your event handler is completed. If the event’s Handled parameter is set to false (the default value), the default painting mechanism will automatically be invoked after your custom draw event handler is completed. The default painting mechanism overrides all rendering you may have performed previously.

See the LayoutControl.CustomDraw topic for more information.

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