SelectedItems Property
Collapse the table of content
Expand the table of content

ListBox.SelectedItems Property

[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]

Gets the list of currently selected items for the ListBox control.

Namespace:  System.Windows.Controls
Assembly:  System.Windows (in System.Windows.dll)

public IList SelectedItems { get; }

Property Value

Type: System.Collections.IList
The list of currently selected items for the ListBox.

For a multiple-selection ListBox, the SelectedItems property returns a list that contains the selected items.

For a single-selection ListBox, the SelectedItems property returns a list that contains the selected item. Alternatively, for a single-selection ListBox, you can also retrieve the selected item by using the SelectedItem property or the index of the selected item by using the SelectedIndex property.

You specify whether the ListBox allows multiple selections by using the SelectionMode property.

Windows Phone OS

Supported in: 8.1, 8.0, 7.1, 7.0

Windows Phone

Show:
© 2017 Microsoft