Interface IListDataSource
Implement IListDataSource to provide custom rendering for a ListView.
Namespace: Terminal.Gui
Assembly: Terminal.Gui.dll
Syntax
public interface IListDataSource
Properties
| Edit this page View SourceCount
Returns the number of elements to display
Declaration
int Count { get; }
Property Value
| Type | Description |
|---|---|
| int |
Length
Returns the maximum length of elements to display
Declaration
int Length { get; }
Property Value
| Type | Description |
|---|---|
| int |
Methods
| Edit this page View SourceIsMarked(int)
Should return whether the specified item is currently marked.
Declaration
bool IsMarked(int item)
Parameters
| Type | Name | Description |
|---|---|---|
| int | item | Item index. |
Returns
| Type | Description |
|---|---|
| bool | true, if marked, false otherwise. |
Render(ListView, ConsoleDriver, bool, int, int, int, int, int)
This method is invoked to render a specified item, the method should cover the entire provided width.
Declaration
void Render(ListView container, ConsoleDriver driver, bool selected, int item, int col, int line, int width, int start = 0)
Parameters
| Type | Name | Description |
|---|---|---|
| ListView | container | The list view to render. |
| ConsoleDriver | driver | The console driver to render. |
| bool | selected | Describes whether the item being rendered is currently selected by the user. |
| int | item | The index of the item to render, zero for the first item and so on. |
| int | col | The column where the rendering will start |
| int | line | The line where the rendering will be done. |
| int | width | The width that must be filled out. |
| int | start | The index of the string to be displayed. |
Remarks
The default color will be set before this method is invoked, and will be based on whether the item is selected or not.
|
Edit this page
View Source
SetMark(int, bool)
Flags the item as marked.
Declaration
void SetMark(int item, bool value)
Parameters
| Type | Name | Description |
|---|---|---|
| int | item | Item index. |
| bool | value | If set to true value. |
ToList()
Return the source as IList.
Declaration
IList ToList()
Returns
| Type | Description |
|---|---|
| IList |