windowsforms-devexpress-dot-xtraeditors-dot-navigatorcustombuttons.md
Adds a new custom button to the current collection.
Namespace : DevExpress.XtraEditors
Assembly : DevExpress.XtraEditors.v25.2.dll
NuGet Package : DevExpress.Win.Navigation
public NavigatorCustomButton Add()
Public Function Add As NavigatorCustomButton
| Type | Description |
|---|---|
| NavigatorCustomButton |
The button added to the collection.
|
The properties of the button created by this method are set to their default values.
By default, a custom button is displayed after the built-in buttons (NavigatorButtonsBase.ButtonCollection). To place the custom button at a specific position among the built-in and existing custom buttons, use the NavigatorCustomButton.Index property.
The following code snippet (auto-collected from DevExpress Examples) contains a reference to the Add() method.
Note
The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.
winforms-grid-data-navigator-custom-button/CS/CustomButton/Form1.cs#L24
DevExpress.XtraEditors.NavigatorCustomButton button;
button = gridControl1.EmbeddedNavigator.Buttons.CustomButtons.Add();
button.Tag = "copy";
winforms-grid-data-navigator-custom-button/VB/CustomButton/Form1.vb#L23
Dim button As DevExpress.XtraEditors.NavigatorCustomButton
button = gridControl1.EmbeddedNavigator.Buttons.CustomButtons.Add()
button.Tag = "copy"
See Also