Gets or sets the index of the first item in the current selection or returns negative one (-1) if the selection is empty.
Assembly: PresentationFramework (in PresentationFramework.dll)
If a Selector supports selecting a single item, the property returns the index of the selected item. If a Selector supports multiple selections, returns the index of the item that the user selected first.
Setting Selector that supports multiple selections clears existing selected items and sets the selection to the item specified by the index. returns -1 if selection is empty.in a
If you set ArgumentException is thrown. If you set to a value equal or greater than the number of child elements, the value is ignored.to a value less that -1, an
Legacy Code Example
The following example uses theproperty to determine whether the item at index 0 is the first item in the selection.Code snippet is not found. Confirm that the code snippet name 'ListBoxItems_snip' is correct.
Available since 3.0
Available since 2.0
Windows Phone Silverlight
Available since 7.0