A newer version of this page is available. Switch to the current version.

TabbedGroup.CustomHeaderButtonClick Event

Occurs when a custom header button is clicked.

Namespace: DevExpress.XtraLayout

Assembly: DevExpress.XtraLayout.v19.1.dll


public event CustomHeaderButtonEventHandler CustomHeaderButtonClick

Event Data

The CustomHeaderButtonClick event's data class is CustomHeaderButtonEventArgs. 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 custom header button.


Using the TabbedGroup.CustomHeaderButtons collection, you can add custom header buttons to the tabbed group. Handle the CustomHeaderButtonClick event to respond to a header button click. Read the Button argument to determine the button being clicked. See a sample handler below.

private void TabbedGroup_CustomHeaderButtonClick(object sender, DevExpress.XtraTab.ViewInfo.CustomHeaderButtonEventArgs e) {
    // Handle the Left button click.
    if (e.Button == leftButton && tabbedGroup.SelectedTabPageIndex > 0)
    // Handle the Right button click.
    if (e.Button == rightButton && tabbedGroup.SelectedTabPageIndex < tabbedGroup.TabPages.Count - 1)
    // Handle the Open button click. Executed only when the Photo tab page is active (the group1 tab page).
    if (e.Button == openButton && ((DevExpress.XtraLayout.Tab.LayoutTabPage)e.ActivePage).Group == group1)

See the TabbedGroup.CustomHeaderButtons property for the complete example.

See Also