The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.
This topic has not yet been rated - Rate this topic

TreeView.SelectedItem Property

Gets the selected item in a TreeView.

Namespace:  System.Windows.Controls
Assembly:  System.Windows.Controls (in System.Windows.Controls.dll)
public Object SelectedItem { get; private set; }

Property Value

Type: System.Object
The currently selected item or null if no item is selected. The default value is null.

Dependency property identifier field: SelectedItemProperty

When the value of SelectedItem changes, the SelectedItemChanged event occurs.

SelectedItem is a read-only property. To set the selected item for a TreeView, set the IsSelected property of a TreeViewItem.


Supported in: 5, 4, 3

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

© 2014 Microsoft. All rights reserved.