Skip to main content
A newer version of this page is available. .

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.v19.2.dll

Declaration

[XtraSerializableProperty]
[DefaultValue(LinkSelectionModeType.None)]
public LinkSelectionModeType LinkSelectionMode { get; set; }

Property Value

Type Default Description
LinkSelectionModeType **None**

The LinkSelectionModeType value that specifies the link selection mode.

Available values:

Name Description
None

Link selection is disabled.

OneInControl

Only one link at a time can be selected throughout the NavBarControl.

OneInGroup

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.

OneInGroupAndAllowAutoSelect

Each group has a selected link independent of other groups. Unlike the LinkSelectionModeType.OneInGroup mode, the OneInGroupAndAllowAutoSelect mode enables automatic link selection in a group (on group activation) if the group does not already have a selection. By default, the first link in the group is auto-selected. To prevent a specific link from being auto-selected, use the NavBarItem.AllowAutoSelect and NavBarItemLink.AllowAutoSelect properties.

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

LinkSelectionModeType.OneInControl

Only one link at a time can be selected throughout the NavBarControl.

LinkSelectionModeType.OneInGroup

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.

LinkSelectionModeType.OneInGroupAndAllowAutoSelect

Each group also has a selected link independent of other groups. Unlike the previous mode, the OneInGroupAndAllowAutoSelect mode enables automatic link selection in a group if the group does not already have a selection. By default, the first link in the group is auto-selected. To prevent a specific link from being auto-selected, use the NavBarItem.AllowAutoSelect and NavBarItemLink.AllowAutoSelect properties.

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.

See Also