Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

NavBarGroup.SelectedLinkIndex Property

Gets or sets a value specifying the index of the group’s selected link.

Namespace: DevExpress.XtraNavBar

Assembly: DevExpress.XtraNavBar.v24.2.dll

NuGet Package: DevExpress.Win

#Declaration

[DefaultValue(-1)]
[XtraSerializableProperty]
public virtual int SelectedLinkIndex { get; set; }

#Property Value

Type Default Description
Int32 -1

An integer value specifying the zero-based index of the selected link within the group. -1 if none of the group’s links are curretly selected.

#Remarks

Link selection can be enabled via the NavBarControl.LinkSelectionMode property.

Read the SelectedLinkIndex property value to obtain the index of the selected link. The obtained value corresponds to the index of the NavBarItemLink object within the NavBarGroup.ItemLinks collection. Assign the index of an item to this property to select the item. Setting the SelectedLink property to -1 or a value greater than the last available link index deselects all links within the group.

See Also