Class ListWrapper
Implements an IListDataSource that renders arbitrary System.Collections.IList instances for ListView.
Inheritance
System.Object
ListWrapper
Implements
Remarks
Implements support for rendering marked items.
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)
Initializes a new instance of ListWrapper given an System.Collections.IList
Declaration
public ListWrapper(IList source)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.IList | source |
Properties
| Improve this Doc View SourceCount
Gets the number of items in the System.Collections.IList.
Declaration
public int Count { get; }
Property Value
Type | Description |
---|---|
System.Int32 |
Length
Gets the maximum item length in the System.Collections.IList.
Declaration
public int Length { get; }
Property Value
Type | Description |
---|---|
System.Int32 |
Methods
| Improve this Doc View SourceIsMarked(Int32)
Returns true if the item is marked, false otherwise.
Declaration
public bool IsMarked(int item)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | item | The item. |
Returns
Type | Description |
---|---|
System.Boolean | true If is marked.false otherwise. |
Render(ListView, ConsoleDriver, Boolean, Int32, Int32, Int32, Int32, Int32)
Renders a ListView item to the appropriate type.
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 ListView. |
ConsoleDriver | driver | The driver used by the caller. |
System.Boolean | marked | Informs if it's marked or not. |
System.Int32 | item | The item. |
System.Int32 | col | The col where to move. |
System.Int32 | line | The line where to move. |
System.Int32 | width | The item width. |
System.Int32 | start | The index of the string to be displayed. |
SetMark(Int32, Boolean)
Sets the item as marked or unmarked based on the value is true or false, respectively.
Declaration
public void SetMark(int item, bool value)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | item | The item |
System.Boolean | value |
ToList()
Returns the source as IList.
Declaration
public IList ToList()
Returns
Type | Description |
---|---|
System.Collections.IList |