TreeView.ItemsSource TreeView.ItemsSource TreeView.ItemsSource TreeView.ItemsSource Property

Definition

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

public : Platform::Object ItemsSource { get; set; }
winrt::Windows::Foundation::IInspectable ItemsSource();

void ItemsSource(winrt::Windows::Foundation::IInspectable itemssource);
public object ItemsSource { get; set; }
Public ReadWrite Property ItemsSource As object
<TreeView ItemsSource="bindingDeclaration"/>
-or-
<TreeView ItemsSource="resourceReferenceToSource"/>

Property Value

object object

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

Additional features and requirements

Device family
Windows 10, version 1809 (introduced v10.0.17763.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v7)

Remarks

The ItemsSource property value must implement one of these interfaces:

C++ .NET
IIterable<IInspectable> IEnumerable<Object>
IBindableIterable IEnumerable

The ItemsControl can provide better performance if the ItemsSource property value also implements a random-access list interface:

C++ .NET
IVector<IInspectable> IList<Object>
IVectorView<IInspectable> IReadOnlyCollection<Object>
IBindableVector IList
IBindableVectorView IList

The ItemsControl can respond to changes if the ItemsSource property value also implements a change notification interface:

C++ .NET
IObservableVector<IInspectable> INotifyCollectionChanged