Table of Contents

Class ListWrapper<T>

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

Provides a default implementation of IListDataSource that renders ListView items using ToString().

public class ListWrapper<T> : IListDataSource, IDisposable

Type Parameters

T
Inheritance
ListWrapper<T>
Implements
Inherited Members

Constructors

ListWrapper(ObservableCollection<T>?)

Creates a new instance of ListWrapper<T> that wraps the specified ObservableCollection<T>.

Properties

Count

Gets the number of items in the data source.

Length

Gets the width in columns of the widest item in the data source.

SuspendCollectionChangedEvent

Gets or sets whether the CollectionChanged event should be suppressed.

Methods

Dispose()

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

IsMarked(int)

Determines whether the specified item is marked.

Render(ListView, bool, int, int, int, int, int)

Renders the specified item to the ListView.

SetMark(int, bool)

Sets the marked state of the specified item.

ToList()

Returns the underlying data source as an IList.

Events

CollectionChanged

Raised when items are added, removed, moved, or the entire collection is refreshed.