Back to Devexpress

CustomHeaderButton Class

windowsforms-devexpress-dot-xtratab-dot-buttons.md

latest4.5 KB
Original Source

CustomHeaderButton Class

A custom header button for tab controls.

Namespace : DevExpress.XtraTab.Buttons

Assembly : DevExpress.XtraEditors.v25.2.dll

NuGet Package : DevExpress.Win.Navigation

Declaration

csharp
public class CustomHeaderButton :
    EditorButton
vb
Public Class CustomHeaderButton
    Inherits EditorButton

The following members return CustomHeaderButton objects:

Remarks

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.

Example

The example demonstrates how to add two custom header buttons to the CustomHeaderButton collection.

csharp
using DevExpress.XtraTab.Buttons;
using DevExpress.XtraEditors.Controls;

xtraTabControl1.CustomHeaderButtons.Add(new CustomHeaderButton(ButtonPredefines.Combo));
xtraTabControl1.CustomHeaderButtons.Add(new CustomHeaderButton(ButtonPredefines.Right));
vb
Imports DevExpress.XtraTab.Buttons
Imports DevExpress.XtraEditors.Controls

xtraTabControl1.CustomHeaderButtons.Add(new CustomHeaderButton(ButtonPredefines.Combo))
xtraTabControl1.CustomHeaderButtons.Add(new CustomHeaderButton(ButtonPredefines.Right))

Inheritance

Object EditorButton CustomHeaderButton

See Also

CustomHeaderButton Members

XtraTabControl

DocumentGroup

DocumentManager

XtraTabControl.CustomHeaderButtonClick

TabbedView.CustomHeaderButtonClick

DevExpress.XtraTab.Buttons Namespace