ItemsControl.ItemsSource Property

Definition

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

C#
public object ItemsSource { get; set; }
XAML
<itemsControl ItemsSource="bindingDeclaration"/>
-or-
<itemsControl ItemsSource="resourceReferenceToSource"/>

Property Value

Object

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

Remarks

The type of the object that you set the ItemsSource property to must implement one of these interfaces.

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

The ItemsControl can raise collection-changed notification events if the ItemsSource property value also implements a collection-changed notification interface.

For .NET, in order for the collection-changed events to be handled, the ItemsSource property must also implement the non-generic IList interface.

Applies to

Product Versions
Windows App SDK 0.8, 1.0, 1.1, 1.2, 1.3, 1.4, 1.5, 1.6