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

ListBoxEditSettings.SelectionMode Property

Gets or sets how list items are selected. This is a dependency property.

Namespace: DevExpress.Xpf.Editors.Settings

Assembly: DevExpress.Xpf.Core.v24.2.dll

NuGet Package: DevExpress.Wpf.Core

#Declaration

public SelectionMode SelectionMode { get; set; }

#Property Value

Type Description
SelectionMode

A SelectionMode enumeration value that specifies the editor’s selection behavior.

#Remarks

Use the SelectionMode property to specify how many items a user can select at once and the way 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.

listBox_SelectedItems

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.

If the SelectionMode property is set to ‘Multiple’, a mouse click or pressing the SPACEBAR selects or deselects an item in the list.

Note

If the ListBoxEdit represents a checked list, the SelectionMode property is set to ‘Multiple’ and cannot be changed.

If the ListBoxEdit represents a radio list, the SelectionMode property is set to ‘Single’ and cannot be changed.

See Also