Table of Contents

Method SetSourceAsync

Namespace
Terminal.Gui.Views
Assembly
Terminal.Gui.dll

SetSourceAsync<T>(ObservableCollection<T>?)

Sets the items from an ObservableCollection<T> using the default IListDataSource for collections.

public Task SetSourceAsync<T>(ObservableCollection<T>? source)

Parameters

source ObservableCollection<T>

The collection to display, or null to clear items through the default collection data-source path (see remarks).

Returns

Task

Type Parameters

T

Remarks

When source is non-null, Source is set to an IListDataSource that wraps that collection (the built-in implementation is ListWrapper<T>).

When source is null:

To always detach the data source regardless of its type, assign Source = null.