Table of Contents

Interface IListDataSource

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

Provides data and rendering for ListView. Implement this interface to provide custom rendering or to wrap custom data sources.

public interface IListDataSource : IDisposable
Inherited Members

Remarks

The default implementation is ListWrapper<T> which renders items using ToString().

Implementors must manage their own marking state and raise CollectionChanged when the underlying data changes.

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

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.