ListBoxEdit.SelectionMode Property
Gets or sets how list items are selected. This is a dependency property.
Namespace: DevExpress.Xpf.Editors
Assembly: DevExpress.Xpf.Core.v24.2.dll
NuGet Package: DevExpress.Wpf.Core
#Declaration
public SelectionMode SelectionMode { get; set; }
#Property Value
Type | Description |
---|---|
Selection |
A Selection |
#Remarks
Use the SelectionMode property to specify how many items a user can select at once, and the ways the user can perform multiple selections. By default, the list box editor functions in single selection mode - items can only be selected one at a time.
Setting the SelectionMode property to Extended
, enables multiple item selection. An end user can select a continuous range of items by clicking them (or using the UP ARROW, DOWN ARROW, PgUp or PgDn) while holding the SHIFT key down. This extends the selection from the previously selected to the current item. Pressing CTRL and clicking the mouse toggles an item’s selected state.
Note
The editor’s Edit
Use the List
If the SelectionMode property is set to Multiple
, a mouse click or pressing the SPACEBAR selects or deselects an item in the list.
Each time the selection changes, the ListBoxEdit.SelectedIndexChanged event is fired.
Note
If the ListMultiple
and cannot be changed.
If the ListSingle
and cannot be changed.
#Related GitHub Examples
The following code snippet (auto-collected from DevExpress Examples) contains a reference to the SelectionMode 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.