Assembly: PresentationFramework (in PresentationFramework.dll)
The SelectedValuePath property specifies the path to the property that is used to determine the value of the property. Setting to a value X attempts to select an item whose value evaluates to X; if no such item can be found, the selection is cleared.
The following example binds a ListBox to a collection of Employee objects. The example sets SelectedValuePath to @EmployeeNumber and to 12345. This selects the Employee that has 12345 as the value of EmployeeNumber. This example also binds a TextBlock to the of the ListBox. When the user changes the selection in the ListBox, the TextBlock is updated to show the employee number of the currently selected employee.
Available since 3.0
Available since 4.0
Windows Phone Silverlight
Available since 7.1