Share via


TreeView.ItemsSource 속성

정의

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

이 설명서는 UWP용 WinUI 2에 적용됩니다(Windows 앱 SDKWinUI의 경우 Windows 앱 SDK 네임스페이스 참조).

public:
 property Platform::Object ^ ItemsSource { Platform::Object ^ get(); void set(Platform::Object ^ value); };
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 { get; 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; }
Public Property ItemsSource As Object
<TreeView ItemsSource="bindingDeclaration"/>
-or-
<TreeView ItemsSource="resourceReferenceToSource"/>

속성 값

Object

Platform::Object

IInspectable

TreeView의 콘텐츠를 생성하는 데 사용되는 개체입니다. 기본값은 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

적용 대상