Allows you to custom paint tabs.
[DXCategory("Appearance")] public event TabHeaderCustomDrawEventHandler CustomDrawTabHeader
<DXCategory("Appearance")> Public Event CustomDrawTabHeader As TabHeaderCustomDrawEventHandler
The CustomDrawTabHeader event's data class is TabHeaderCustomDrawEventArgs. The following properties provide information specific to this event:
|Bounds||Gets the rectangle that specifies the bounds of the tab header.|
|Cache||Provides access to the drawing surface and a cache of pens, fonts, and brushes.|
|ControlInfo||Gets an object that contains information about the tab being drawn.|
|Graphics||Provides access to the drawing surface.|
|Handled||Gets or sets whether the event is handled and prevents the default draw operation from being performed.|
|Painter||Provides access to the object that performs paint operations.|
|TabHeaderInfo||Provides access to the object that contains information about the page being drawn.|
|TabHeaderRowInfo||Provides access to the object that contains information about the row being drawn.|
The CustomDrawTabHeader event fires repeatedly for each tab. You can identify the currently processed tab from the event's TabHeaderInfo parameter. To paint custom information, use the methods provided by the Cache or Graphics event parameter.
When you handle the CustomDrawTabHeader event, you can invoke the default rendering of the current tab or its individual elements with the following methods:
- DefaultDraw - Performs the default rendering of the tab (including all its elements)
- DefaultDrawBackground - Performs the default rendering of the tab's background.
- DefaultDrawButtons - Performs the default rendering of the tab's close button.
- DefaultDrawImage - Performs the default rendering of the tab's image ( XtraTabPage.ImageOptions)
- DefaultDrawText - Performs the default rendering of the tab's text (XtraTabPage.Text).
Set the Handled event parameter to true to indicate that you have handled the CustomDrawTabHeader 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.