TreeViewItem.ItemsSource Property

Definition

Gets or sets an object source used to generate the content of the TreeView.

Equivalent WinUI 2 API for UWP: Microsoft.UI.Xaml.Controls.TreeViewItem.ItemsSource (for WinUI in the Windows App SDK, see the Windows App SDK namespaces).

public:
 property Platform::Object ^ ItemsSource { Platform::Object ^ get(); void set(Platform::Object ^ value); };
IInspectable ItemsSource();

void ItemsSource(IInspectable value);
public object ItemsSource { get; set; }
var object = treeViewItem.itemsSource;
treeViewItem.itemsSource = object;
Public Property ItemsSource As Object
<TreeViewItem ItemsSource="bindingDeclaration"/>
-or-
<TreeViewItem ItemsSource="resourceReferenceToSource"/>

Property Value

Object

Platform::Object

IInspectable

The object that is used to generate the content of the TreeViewItem. The default is null.

Windows requirements

Device family
Windows 10, version 1809 (introduced in 10.0.17763.0)
API contract
Windows.Foundation.UniversalApiContract (introduced in v7.0)

Remarks

TThe type of the object that you set the ItemsSource property to must implement particular interface(s). For more details, see the Remarks section of ItemsControl.ItemsSource.

Applies to