Back to Devexpress

NavigatorCustomButtons.Add() Method

windowsforms-devexpress-dot-xtraeditors-dot-navigatorcustombuttons.md

latest2.9 KB
Original Source

NavigatorCustomButtons.Add() Method

Adds a new custom button to the current collection.

Namespace : DevExpress.XtraEditors

Assembly : DevExpress.XtraEditors.v25.2.dll

NuGet Package : DevExpress.Win.Navigation

Declaration

csharp
public NavigatorCustomButton Add()
vb
Public Function Add As NavigatorCustomButton

Returns

TypeDescription
NavigatorCustomButton

The button added to the collection.

|

Remarks

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

csharp
DevExpress.XtraEditors.NavigatorCustomButton button;
button = gridControl1.EmbeddedNavigator.Buttons.CustomButtons.Add();
button.Tag = "copy";

winforms-grid-data-navigator-custom-button/VB/CustomButton/Form1.vb#L23

vb
Dim button As DevExpress.XtraEditors.NavigatorCustomButton
button = gridControl1.EmbeddedNavigator.Buttons.CustomButtons.Add()
button.Tag = "copy"

See Also

Index

NavigatorCustomButtons Class

NavigatorCustomButtons Members

DevExpress.XtraEditors Namespace