Bagikan melalui


TreeView.ItemsSource Properti

Definisi

Mendapatkan atau mengatur sumber objek yang digunakan untuk menghasilkan konten TreeView.

API WinUI 2 yang setara untuk UWP: Microsoft.UI.Xaml.Controls.TreeView.ItemsSource (untuk WinUI di SDK Aplikasi Windows, lihat namespace SDK Aplikasi Windows).

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 = treeView.itemsSource;
treeView.itemsSource = object;
Public Property ItemsSource As Object
<TreeView ItemsSource="bindingDeclaration"/>
-or-
<TreeView ItemsSource="resourceReferenceToSource"/>

Nilai Properti

Object

Platform::Object

IInspectable

Objek yang digunakan untuk menghasilkan konten TreeView. Defaultnya adalah null.

Persyaratan Windows

Rangkaian perangkat
Windows 10, version 1809 (diperkenalkan dalam 10.0.17763.0)
API contract
Windows.Foundation.UniversalApiContract (diperkenalkan dalam v7.0)

Keterangan

Jenis objek yang Anda atur properti ItemsSource ke harus mengimplementasikan antarmuka tertentu. Untuk detail selengkapnya, lihat bagian KeteranganitemControl.ItemsSource.

Berlaku untuk