Each group of the NavBarControl is represented by a NavBarGroup object. The collection of such objects is accessed via the control's Groups property.
You can also use the Groups property to access individual groups by their indexes or captions specified via the parameter.

Example
The following sample code demonstrates how to iterate through groups and item links. The group collection is accessed via the Groups property. Links are accessed via the group's NavBarGroup.ItemLinks property.
C# |
using DevExpress.XtraNavBar;
for (int i = 0; i < navBarControl1.Groups.Count; i++) {
NavBarGroup currGroup = navBarControl1.Groups[i];
for (int j = 0; j < currGroup.ItemLinks.Count; j++) {
NavBarItemLink currLink = currGroup.ItemLinks[j];
}
}
|
VB |
Imports DevExpress.XtraNavBar
Dim I, J As Integer
For I = 0 To NavBarControl1.Groups.Count - 1
Dim CurrGroup As NavBarGroup = NavBarControl1.Groups(I)
For J = 0 To CurrGroup.ItemLinks.Count - 1
Dim CurrLink As NavBarItemLink = CurrGroup.ItemLinks(J)
Next
Next
|