NavBarControl.LinkSelectionMode Property
Gets or sets whether link selection is enabled and whether each group or only one group can contain a selected link simultaneously.
Namespace: DevExpress.XtraNavBar
Assembly: DevExpress.XtraNavBar.v24.2.dll
NuGet Package: DevExpress.Win
#Declaration
#Property Value
Type | Default | Description |
---|---|---|
Link |
None | The Link |
Available values:
Name | Description |
---|---|
None | Link selection is disabled. |
One |
Only one link at a time can be selected throughout the Nav |
One |
Each group can have a selected link independent of other groups. A group will not have a selected link until you or an end-user has explicitly selected a link. |
One |
Each group has a selected link independent of other groups. Unlike the Link Note Automatic link selection is not supported for Explorer Bar Views. |
#Remarks
The LinkSelectionMode property allows you to enable link selection and to specify the mode in which links can be selected. By default, link selection is disabled. A click on a link fires the NavBarControl.LinkClicked and NavBarItem.LinkClicked events which you can handle to perform custom actions. You cannot differentiate a clicked link from non-clicked links.
Link selection (link highlighting clicked once)
To enable link selection, set the LinkSelectionMode property to one of the following modes:
Link Selection Mode | Description |
---|---|
Only one link at a time can be selected throughout the Nav | |
Each group has a selected link independent of other groups. A group will not have a selected link until you or an end-user has selected a link. | |
Each group also has a selected link independent of other groups.
Unlike the previous mode, the One Note Automatic link selection is not supported for Explorer Bar Views. |
To respond to link selection, handle the NavBarControl.SelectedLinkChanged event, rather than the previously mentioned click events. The NavBarControl.SelectedLink, NavBarGroup.SelectedLink and NavBarGroup.SelectedLinkIndex properties allow you to specify the selected link for the NavBarControl and for each group.