ItemsControl.ItemsSource 속성

정의

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

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

속성 값

Object

Platform::Object

IInspectable

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

설명

ItemsSource 속성을 로 설정한 개체의 형식은 이러한 인터페이스 중 하나를 구현해야 합니다.

.NET C++/WinRT C++/CX
IEnumerable<개체> IVector<IInspectable> IIterable<IInspectable>
IEnumerable IBindableObservableVector IBindableIterable

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

.NET C++/WinRT C++/CX
IList<개체> IVector<IInspectable> IVector<IInspectable>
IReadOnlyCollection<개체> IVector<IInspectable> IVectorView<IInspectable>
IList IBindableObservableVector IBindableVector
IList IBindableObservableVector IBindableVectorView

ItemsSource 속성 값이 컬렉션 변경 알림 인터페이스도 구현하는 경우 ItemsControl은 컬렉션 변경 알림 이벤트를 발생할 수 있습니다.

.NET C++/WinRT C++/CX
관리형 데스크톱 C#/.NET Core 앱
System.Collections.Specialized.INotifyCollectionChanged

UWP(유니버설 Windows 플랫폼) 앱
Windows.UI.Xaml.Interop.INotifyCollectionChanged

IObservableVector<IInspectable> IObservableVector<IInspectable>

.NET의 경우 컬렉션 변경 이벤트를 처리하려면 ItemsSource 속성이 제네릭이 아닌 IList 인터페이스도 구현해야 합니다.

적용 대상