ListViewBase.SelectedItems Property


Gets the currently selected items.

Equivalent WinUI property: Microsoft.UI.Xaml.Controls.ListViewBase.SelectedItems.

 property IVector<Platform::Object ^> ^ SelectedItems { IVector<Platform::Object ^> ^ get(); };
IVector<IInspectable> SelectedItems();
public IList<object> SelectedItems { get; }
var iVector = listViewBase.selectedItems;
Public ReadOnly Property SelectedItems As IList(Of Object)

Property Value


A collection of the currently selected items. The default is an empty collection.


When SelectionMode is Multiple or Extended, use the SelectedItems property to get the items that are selected. When SelectionMode is Single, use the Selector.SelectedItem property to get the item that's selected.

Starting in Windows 10, you can use the SelectRange and DeselectRange methods with the SelectedRanges property to make selections using ranges of indexes. This is a more efficient way to describe item selection than using SelectedItems, which requires the actual item object to be created for each selected item.


If the ItemsSource implements IItemsRangeInfo, the SelectedItems collection is not updated based on selection in the list. Use the SelectedRanges property instead.

Applies to

See also