Selector.SelectedIndex Property
Definition
Gets or sets the index of the selected item.
Equivalent WinUI property: Microsoft.UI.Xaml.Controls.Primitives.Selector.SelectedIndex.
public:
property int SelectedIndex { int get(); void set(int value); };
int SelectedIndex();
void SelectedIndex(int value);
public int SelectedIndex { get; set; }
var int32 = selector.selectedIndex;
selector.selectedIndex = int32;
Public Property SelectedIndex As Integer
<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.