ItemsControl.ItemsSource ItemsControl.ItemsSource ItemsControl.ItemsSource ItemsControl.ItemsSource Property

Definition

Gets or sets an object source used to generate the content of the ItemsControl.

public : Platform::Object ItemsSource { get; set; }
winrt::Windows::Foundation::IInspectable ItemsSource();

void ItemsSource(winrt::Windows::Foundation::IInspectable itemssource);
public object ItemsSource { get; set; }
Public ReadWrite Property ItemsSource As object
<itemsControl ItemsSource="bindingDeclaration"/>
-or-
<itemsControl ItemsSource="resourceReferenceToSource"/>

Property Value

object object

The object that is used to generate the content of the ItemsControl. The default is null.

Remarks

The ItemsSource property value must implement one of these interfaces:

C++ .NET
IIterable<IInspectable> IEnumerable<Object>
IBindableIterable IEnumerable

The ItemsControl can provide better performance if the ItemsSource property value also implements a random-access list interface:

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

The ItemsControl can respond to changes if the ItemsSource property value also implements a change notification interface:

C++ .NET
IObservableVector<IInspectable> INotifyCollectionChanged