TreeViewItem.ItemsSource Property
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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
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.