Share via


TreeViewItem.ItemsSource 속성

정의

TreeView의 콘텐츠를 생성하는 데 사용되는 개체 원본을 가져오거나 설정합니다.

public:
 property Platform::Object ^ ItemsSource { Platform::Object ^ get(); void set(Platform::Object ^ value); };
/// [get: Microsoft.UI.Xaml.CustomAttributes.MUXPropertyChangedCallback(enable=true)]
/// [set: Microsoft.UI.Xaml.CustomAttributes.MUXPropertyChangedCallback(enable=true)]
IInspectable ItemsSource();

void ItemsSource(IInspectable value);
/// [Microsoft.UI.Xaml.CustomAttributes.MUXPropertyChangedCallback(enable=true)]
/// [get: Microsoft.UI.Xaml.CustomAttributes.MUXPropertyChangedCallback(enable=true)]
/// [set: Microsoft.UI.Xaml.CustomAttributes.MUXPropertyChangedCallback(enable=true)]
IInspectable ItemsSource();

void ItemsSource(IInspectable value);
public object ItemsSource { [Microsoft.UI.Xaml.CustomAttributes.MUXPropertyChangedCallback(enable=true)] get; [Microsoft.UI.Xaml.CustomAttributes.MUXPropertyChangedCallback(enable=true)] set; }
[Microsoft.UI.Xaml.CustomAttributes.MUXPropertyChangedCallback(enable=true)]
public object ItemsSource { [Microsoft.UI.Xaml.CustomAttributes.MUXPropertyChangedCallback(enable=true)] get; [Microsoft.UI.Xaml.CustomAttributes.MUXPropertyChangedCallback(enable=true)] set; }
var object = treeViewItem.itemsSource;
treeViewItem.itemsSource = object;
Public Property ItemsSource As Object
<TreeViewItem ItemsSource="bindingDeclaration"/>
-or-
<TreeViewItem ItemsSource="resourceReferenceToSource"/>

속성 값

Object

Platform::Object

IInspectable

TreeViewItem의 콘텐츠를 생성하는 데 사용되는 개체입니다. 기본값은 null입니다.

특성
Microsoft.UI.Xaml.CustomAttributes.MUXPropertyChangedCallbackAttribute

설명

ItemsSource 속성 값은 다음 인터페이스 중 하나를 구현해야 합니다.

C++ .NET
IIterable<IInspectable> IEnumerable<개체>
IBindableIterable IEnumerable

ItemsSource 속성 값이 임의 액세스 목록 인터페이스도 구현하는 경우 ItemsControl은 더 나은 성능을 제공할 수 있습니다.

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

ItemsSource 속성 값이 변경 알림 인터페이스도 구현하는 경우 ItemsControl은 변경 내용에 응답할 수 있습니다.

C++ .NET
IObservableVector<IInspectable> INotifyCollectionChanged

적용 대상