Content Model: TreeViewItem is a HeaderedItemsControl. Its content properties are Items and ItemsSource, and its header property is Header. For more information on the content model for TreeViewItem, see Controls Content Model Overview.
TreeViewItem controls can be embedded inside other TreeViewItem controls to create a hierarchy of nodes inside a TreeView control.
The following illustration shows a hierarchy of TreeViewItem controls inside a TreeView.
.jpg)
To expand or collapse a TreeViewItem, use the IsExpanded property.
For more information about the TreeView control, see the TreeView Overview.
Dependency properties for this control might be set by the control’s default style. If a property is set by a default style, the property might change from its default value when the control appears in the application. The default style is determined by which desktop theme is used when the application is running. For more information, see Themes.