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 either the IIterable or IBindableIterable interface. For example, in a C# application, it must implement IEnumerable or IEnumerable.

The ItemsControl can provide better performance if the ItemsSource property value also implements a random-access list interface: IVector, IVectorView, IBindableVector, or IBindableVectorView. In C#, this means IList, IReadOnlyCollection, or IList.

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