NavItemCollection.Item[Int32] Property

Gets an item of the collection by its index.

Namespace: DevExpress.XtraNavBar

Assembly: DevExpress.XtraNavBar.v21.2.dll


public virtual NavBarItem this[int index] { get; }


Name Type Description
index Int32

An integer value specifying the zero-based index of the desired item.

Property Value

Type Description

A NavBarItem object representing the item located at the specified index within the collection.


If the parameter value is negative or exceeds the maximum available index, an exception is raised.


The following sample code shows you how to iterate over NavBarControl items via the NavBarControl.Items property.

using DevExpress.XtraNavBar;
// ...
for (int i = 0; i < navBarControl1.Items.Count; i++) {
   NavBarItem item = navBarControl1.Items[i];
   // perform some operations on an item here
See Also