windowsforms-devexpress-dot-xtratab-dot-buttons.md
A custom header button for tab controls.
Namespace : DevExpress.XtraTab.Buttons
Assembly : DevExpress.XtraEditors.v25.2.dll
NuGet Package : DevExpress.Win.Navigation
public class CustomHeaderButton :
EditorButton
Public Class CustomHeaderButton
Inherits EditorButton
The following members return CustomHeaderButton objects:
You can add custom header buttons to an XtraTabControl and to a DocumentGroup (within a DocumentManager). The XtraTabControl.CustomHeaderButtons property allows you to add CustomHeaderButton objects to an XtraTabControl. Use the IDocumentGroupProperties.CustomHeaderButtons property to add CustomHeaderButton objects to a DocumentGroup.
A custom button is a CustomHeaderButton object that provides a number of settings that specify the button’s glyph, caption, etc.
You can implement custom actions for an XtraTabControl‘s custom header buttons via the XtraTabControl.CustomHeaderButtonClick event. To realize custom actions for a DocumentGroup, use the TabbedView.CustomHeaderButtonClick event. These events provide a Button parameter that can be used to identify the currently clicked button.
The example demonstrates how to add two custom header buttons to the CustomHeaderButton collection.
using DevExpress.XtraTab.Buttons;
using DevExpress.XtraEditors.Controls;
xtraTabControl1.CustomHeaderButtons.Add(new CustomHeaderButton(ButtonPredefines.Combo));
xtraTabControl1.CustomHeaderButtons.Add(new CustomHeaderButton(ButtonPredefines.Right));
Imports DevExpress.XtraTab.Buttons
Imports DevExpress.XtraEditors.Controls
xtraTabControl1.CustomHeaderButtons.Add(new CustomHeaderButton(ButtonPredefines.Combo))
xtraTabControl1.CustomHeaderButtons.Add(new CustomHeaderButton(ButtonPredefines.Right))
Object EditorButton CustomHeaderButton
See Also
XtraTabControl.CustomHeaderButtonClick