The following sample code obtains the index of the active group. If the active group is not the first within the collection, the first group becomes active.
Note: this example only works for those control paint styles which allow only a single expanded group at a time.
int activeGroupIndex = navBarControl1.Groups.IndexOf(navBarControl1.ActiveGroup);
if (activeGroupIndex != 0)
navBarControl1.ActiveGroup = navBarControl1.Groups[0];
Dim ActiveGroupIndex = NavBarControl1.Groups.IndexOf(NavBarControl1.ActiveGroup)
If ActiveGroupIndex <> 0 Then
NavBarControl1.ActiveGroup = NavBarControl1.Groups(0)
End If