Skip to main content
Bar

BarItems.FindById(Int32) Method

Returns an item identified by its unique identifier.

Namespace: DevExpress.XtraBars

Assembly: DevExpress.XtraBars.v23.2.dll

NuGet Package: DevExpress.Win.Navigation

Declaration

public BarItem FindById(
    int itemId
)

Parameters

Name Type Description
itemId Int32

A zero-based integer specifying the item’s unique identifier.

Returns

Type Description
BarItem

A BarItem descendant with the specified unique identifier.

Remarks

The FindById method scans the collection starting at the first element and returns the item whose BarItem.Id property value matches the itemId parameter.

This method returns null (Nothing in Visual Basic) in the following cases:

  • the item with the unique identifier specified is not found;
  • the itemId parameter is -1.
See Also