ItemsView<TVisual>.ItemsSource ItemsView<TVisual>.ItemsSource Property

Definition

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

Remarks

While any IEnumerable implementer is accepted, any that do not implement IList or System.Collections.Generic.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 Xamarin.Forms.BindingBase.EnableCollectionSynchronization to enable proper synchronization of access to the thread.

Applies to