Skip to main content
Bar

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

BarItems.FindById(Int32) Method

Returns an item identified by its unique identifier.

Namespace: DevExpress.XtraBars

Assembly: DevExpress.XtraBars.v24.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