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

XtraTabControl.HeaderButtonClick Event

Occurs when a built-in header button is clicked.

Namespace: DevExpress.XtraTab

Assembly: DevExpress.XtraEditors.v24.2.dll

NuGet Package: DevExpress.Win.Navigation

#Declaration

[DXCategory("Behavior")]
public event HeaderButtonEventHandler HeaderButtonClick

#Event Data

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

Property Description
ActivePage Gets an active tab page within the tab control.
Button Gets the currently processed header button.
Handled Gets or sets whether the XtraTabControl.HeaderButtonClick event has been handled, and no default processing is required.

#Remarks

The tab control has the built-in Next, Prev and Close header buttons (see the XtraTabControl.HeaderButtons topic). The Next and Prev buttons have default processed actions (switching an active tab to next or previous). By default, the Close button has no default action. To implement a default action for the Close button, use the XtraTabControl.CloseButtonClick event.

You can override default actions for the built-in header buttons by handling the HeaderButtonClick event. When handling the HeaderButtonClick event, you need to set the HeaderButtonEventArgs.Handled property to true, to prevent a button’s default action from being invoked after your event handler call.

You can also add custom header buttons to a tab control via the XtraTabControl.CustomHeaderButtons property.

See Also