Property Source
Source
Gets or sets the IListDataSource that provides items for this ListView.
public IListDataSource? Source { get; set; }
Property Value
- IListDataSource
The current data source, or null if none is attached.
Remarks
Assign null to detach the data source completely.
For an ObservableCollection<T>, SetSource<T>(ObservableCollection<T>?) and SetSourceAsync<T>(ObservableCollection<T>?) install a default IListDataSource implementation. Use this property directly when supplying a custom IListDataSource.
Clearing via SetSource<T>(ObservableCollection<T>?) with a null collection is not always the same as assigning null here; see those methods' remarks.