ItemsView<TVisual>.ItemsSource Property


Gets or sets the source of items to template and display.

public System.Collections.IEnumerable ItemsSource { get; set; }
member this.ItemsSource : System.Collections.IEnumerable with get, set

Property Value



While any IEnumerable implementer is accepted, any that do not implement IList or IReadOnlyList<T> (where T is a class) will be converted to list by iterating.

If your collection implements INotifyCollectionChanged, any changes raised from the event on this interface will be reflected in the items view. Note that if the event is raised on another thread the main thread, the results will be unpredictable depending on the platform. To safely modify your collection (and raise the event) from another thread, call EnableCollectionSynchronization(IEnumerable, Object, CollectionSynchronizationCallback) to enable proper synchronization of access to the thread.

Applies to