Class ListWrapper
Implement IListDataSource to provide custom rendering for a ListView.
Inheritance
System.Object
ListWrapper
Implements
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Terminal.Gui
Assembly: Terminal.Gui.dll
Syntax
public class ListWrapper : IListDataSource
Constructors
| Improve this Doc View SourceListWrapper(IList)
Declaration
public ListWrapper(IList source)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.IList | source |
Properties
| Improve this Doc View SourceCount
Returns the number of elements to display
Declaration
public int Count { get; }
Property Value
Type | Description |
---|---|
System.Int32 |
Length
Returns the maximum length of elements to display
Declaration
public int Length { get; }
Property Value
Type | Description |
---|---|
System.Int32 |
Methods
| Improve this Doc View SourceIsMarked(Int32)
Should return whether the specified item is currently marked.
Declaration
public bool IsMarked(int item)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | item | Item index. |
Returns
Type | Description |
---|---|
System.Boolean | true, if marked, false otherwise. |
Render(ListView, ConsoleDriver, Boolean, Int32, Int32, Int32, Int32, Int32)
This method is invoked to render a specified item, the method should cover the entire provided width.
Declaration
public void Render(ListView container, ConsoleDriver driver, bool marked, 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. |
System.Boolean | marked | |
System.Int32 | item | The index of the item to render, zero for the first item and so on. |
System.Int32 | col | The column where the rendering will start |
System.Int32 | line | The line where the rendering will be done. |
System.Int32 | width | The width that must be filled out. |
System.Int32 | start | The index of the string to be displayed. |
SetMark(Int32, Boolean)
Flags the item as marked.
Declaration
public void SetMark(int item, bool value)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | item | Item index. |
System.Boolean | value | If set to true value. |
StartsWith(String)
Declaration
public int StartsWith(string search)
Parameters
Type | Name | Description |
---|---|---|
System.String | search |
Returns
Type | Description |
---|---|
System.Int32 |
ToList()
Return the source as IList.
Declaration
public IList ToList()
Returns
Type | Description |
---|---|
System.Collections.IList |