NavBarControl.Groups Property
Gets a collection of objects representing groups of the NavBarControl.
Namespace: DevExpress.XtraNavBar
Assembly: DevExpress.XtraNavBar.v19.1.dll
Declaration
Property Value
Type | Description |
---|---|
NavGroupCollection | A NavGroupCollection object holding a collection of groups. |
Remarks
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 NavBarControl.Groups
property. Links are accessed via the group’s NavBarGroup.ItemLinks property.
using DevExpress.XtraNavBar;
//...
for (int i = 0; i < navBarControl1.Groups.Count; i++) {
NavBarGroup currGroup = navBarControl1.Groups[i];
// perform some operations on a group here
//...
for (int j = 0; j < currGroup.ItemLinks.Count; j++) {
NavBarItemLink currLink = currGroup.ItemLinks[j];
// perform some operations on a link here
//...
}
}
Related GitHub Examples
The following code snippets (auto-collected from DevExpress Examples) contain references to the Groups property.
Note
The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.