Bar

BarManager.GetNewItemId() Method

Returns the new unique identifier of an item.

Namespace: DevExpress.XtraBars

Assembly: DevExpress.XtraBars.v20.1.dll

Declaration

public int GetNewItemId()
Public Function GetNewItemId As Integer

Returns

Type Description
Int32

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

Remarks

The GetNewItemId method can be used to initialize the bar item's BarItem.Id property. This property identifies the item from amongst the other items that belong to the same BarManager. When creating bar items at runtime you need to manually set their BarItem.Id properties to allow the bars' layout to be saved and restored correctly.

See Also