Back to Devexpress

BarManager.GetNewItemId() Method

windowsforms-devexpress-dot-xtrabars-dot-barmanager-d2b17030.md

latest2.4 KB
Original Source

BarManager.GetNewItemId() Method

This method is intended for internal use. Returns the new unique identifier of an item.

Namespace : DevExpress.XtraBars

Assembly : DevExpress.XtraBars.v25.2.dll

NuGet Package : DevExpress.Win.Navigation

Declaration

csharp
public int GetNewItemId()
vb
Public Function GetNewItemId As Integer

Returns

TypeDescription
Int32

An integer value representing the unique identifier of an item within the BarManager.

|

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the GetNewItemId() 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-assign-popupmenu-to-dropdownbutton/CS/DropDownButtonExample/Form1.cs#L29

csharp
item.Caption = caption;
item.Id = this.barManager1.GetNewItemId();
item.ImageOptions.ImageIndex = imageIndex;

winforms-assign-popupmenu-to-dropdownbutton/VB/DropDownButtonExample/Form1.vb#L30

vb
item.Caption = caption
item.Id = barManager1.GetNewItemId()
item.ImageOptions.ImageIndex = imageIndex

See Also

Id

BarManager Class

BarManager Members

DevExpress.XtraBars Namespace