Selector.SelectedIndex Property

May 11, 2014

Gets or sets the index of the selected item.

Namespace:  System.Windows.Controls.Primitives
Assembly:  System.Windows (in System.Windows.dll)

public int SelectedIndex { get; set; }

Property Value

Type: System.Int32
The index of the selected item. The default is -1.

Dependency property identifier field: SelectedIndexProperty

The Selector does not allow more than one item to be selected at a time. Use the SelectedIndex or SelectedItem property to retrieve the selected item in code.

This property is not typically used in XAML.

Windows Phone OS

Supported in: 8.1, 8.0, 7.1, 7.0

Windows Phone

Show:
© 2014 Microsoft