Back to Devexpress

NavBarGroup.ItemLinks Property

windowsforms-devexpress-dot-xtranavbar-dot-navbargroup-560f3387.md

latest3.5 KB
Original Source

NavBarGroup.ItemLinks Property

Gets an object containing the collection of links which belong to the group.

Namespace : DevExpress.XtraNavBar

Assembly : DevExpress.XtraNavBar.v25.2.dll

NuGet Package : DevExpress.Win

Declaration

csharp
[Browsable(false)]
[XtraSerializableProperty(true, false, true)]
[InheritableCollection]
public NavLinkCollection ItemLinks { get; }
vb
<Browsable(False)>
<XtraSerializableProperty(True, False, True)>
<InheritableCollection>
Public ReadOnly Property ItemLinks As NavLinkCollection

Property Value

TypeDescription
NavLinkCollection

A NavLinkCollection object containing the collection of group links.

|

Remarks

NavBarControl hold collections of groups and items. These are represented by its NavBarControl.Groups and NavBarControl.Items properties respectively. To display an item within a group, a link between them must be created. The collection of control links is available via the ItemlLinks property. This property returns a NavLinkCollection object whose methods can be used to manage links within the collection (add, delete, etc.).

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.

csharp
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
      //...
   }
}
vb
Imports DevExpress.XtraNavBar
' ...
Dim I, J As Integer
For I = 0 To NavBarControl1.Groups.Count - 1
   Dim CurrGroup As NavBarGroup = NavBarControl1.Groups(I)
   ' perform some operations on a group here
   '...
   For J = 0 To CurrGroup.ItemLinks.Count - 1
      Dim CurrLink As NavBarItemLink = CurrGroup.ItemLinks(J)
      ' perform some operations on a link here
      '...
   Next
Next

See Also

NavLinkCollection

Add(NavBarItem)

NavBarItemLink

Navigation Bar

NavBarGroup Class

NavBarGroup Members

DevExpress.XtraNavBar Namespace