-api-id | -api-type |
---|---|
P:Windows.UI.Xaml.Controls.Primitives.Selector.SelectedIndex |
winrt property |
Gets or sets the index of the selected item.
<selector SelectedIndex="int" .../>
The index of the selected item. The default is -1, which indicates that no item is selected.
Some controls that are derived from Selector, like ListBox, ListView, and GridView, also support multi-selection. When multi-selection is enabled in those controls, use their SelectedItems property to get the selected item collection.
ListBox.SelectionMode, ListBox.SelectedItems, ListViewBase.SelectionMode, ListViewBase.SelectedItems