Skip to content

Latest commit

 

History

History
30 lines (21 loc) · 1.28 KB

selector_selectedindex.md

File metadata and controls

30 lines (21 loc) · 1.28 KB
-api-id -api-type
P:Microsoft.UI.Xaml.Controls.Primitives.Selector.SelectedIndex
winrt property

Microsoft.UI.Xaml.Controls.Primitives.Selector.SelectedIndex

-description

Gets or sets the index of the selected item.

-xaml-syntax

<selector SelectedIndex="int" .../>

-property-value

The index of the selected item. The default is -1, which indicates that no item is selected.

-remarks

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.

-examples

-see-also

ListBox.SelectionMode, ListBox.SelectedItems, ListViewBase.SelectionMode, ListViewBase.SelectedItems