-api-id | -api-type |
---|---|
T:Windows.UI.Xaml.Controls.ItemCollection |
winrt class |
Holds the list of items that represent the content of an ItemsControl.
<ItemsControl>
oneOrMoreFrameworkElements
</ItemsControl>
An ItemCollection is enumerable, so you can use language-specific syntax such as foreach in C# to enumerate the items in the collection. The compiler does the type-casting for you and you won't need to cast to IEnumerable
explicitly. If you do need to cast explicitly, for example if you want to call GetEnumerator, cast to IEnumerable<T>with an Object or FrameworkElement constraint.
ItemsControl, IObservableVector<T>, IVector<T>, IIterable<T>, IList<T>