Skip to main content
Bar

BarManagerCategory.GetItem(Int32) Method

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

Namespace: DevExpress.XtraBars

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