BarItem.Id Property

Uniquely identifies the current BarItem.

Namespace: DevExpress.XtraBars

Assembly: DevExpress.XtraBars.v21.1.dll


public int Id { get; set; }

Property Value

Type Default Description


The current BarItem‘s unique identifier.


To allow the bars’ layout to be saved and restored correctly each bar item’s Id property must be set to a unique integer.

When creating bar items at design time the Id property is initialized automatically.

If you create bar items via code and wish the bars’ layout to be stored and restored correctly, you need to set the Id property manually. To initialize the Id property the BarManager.GetNewItemId method can be used.

See Also