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

BarManagerCategory.GetItem(Int32) Method

Gets an item displayed in the category at the specified position.

Namespace: DevExpress.XtraBars

Assembly: DevExpress.XtraBars.v24.2.dll

NuGet Package: DevExpress.Win.Navigation

#Declaration

public BarItem GetItem(
    int index
)

#Parameters

Name Type Description
index Int32

A zero-based integer specifying the item’s position within the category.

#Returns

Type Description
BarItem

A BarItem descendant representing an item displayed in the category at the specified position. null (Nothing in Visual Basic) if no item is found.

#Example

The following sample code removes all links to the items displayed in the “Custom” category.

if (barManager1.Categories.IndexOf("Custom") != -1)
   for (int i = 0; i < barManager1.Categories["Custom"].GetItemCount(); i++)
      barManager1.Categories["Custom"].GetItem(i).Links.Clear();
See Also