NavBarControl.SelectedLink Property
Gets or sets an object representing the selected link.
Namespace: DevExpress.XtraNavBar
Assembly: DevExpress.XtraNavBar.v19.1.dll
Declaration
Property Value
Type | Description |
---|---|
NavBarItemLink | A NavBarItemLink object representing the selected link. |
Remarks
End-users can select links via mouse clicks. The NavBarControl also provides the capability to select links in code. You can use the SelectedLink property for this purpose.
In the Navigation Pane and Side Bar Views, the SelectedLink property specifies the selected link in the active group (NavBarControl.ActiveGroup). In the Explorer Bar Views, which provide access to all groups simultaneously, the SelectedLink property specifies the first group’s selected link. To refer to the selected link in a specific group, use the NavBarGroup.SelectedLink or NavBarGroup.SelectedLinkIndex property instead. If link selection is prohibited, the SelectedLink property returns null and assigning the SelectedLink property has no effect.
See the NavBarControl.LinkSelectionMode topic for details on enabling link selection.
Related GitHub Examples
The following code snippets (auto-collected from DevExpress Examples) contain references to the SelectedLink 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.