Bar

BarItem.Id Property

Uniquely identifies the current BarItem.

Namespace: DevExpress.XtraBars

Assembly: DevExpress.XtraBars.v20.1.dll

Declaration

[Browsable(false)]
[XtraSerializableProperty]
[DefaultValue(-1)]
public int Id { get; set; }
<Browsable(False)>
<XtraSerializableProperty>
<DefaultValue(-1)>
Public Property Id As Integer

Property Value

Type Default Description
Int32

-1

The current BarItem's unique identifier.

Remarks

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