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<개체> IIterable<IInspectable> IIterable<Object^>
IEnumerable IBindableIterable IBindableIterable

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

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

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

.NET C++/WinRT C++/CX
INotifyCollectionChanged INotifyCollectionChanged INotifyCollectionChanged
ObservableCollection<개체> IObservableVector<IInspectable> IObservableVector<Object^>

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

적용 대상