ListBox.SelectedItems Property

Definition

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

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

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

Property Value

IList<Object>

The list of currently selected items for the ListBox control.

Remarks

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.

Applies to

See also