Table of Contents

Method SetSource

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

SetSource<T>(ObservableCollection<T>?)

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

public void SetSource<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).

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.