Class ListWrapper
Implements an IListDataSource that renders arbitrary System.Collections.IList instances for 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
Remarks
Implements support for rendering marked items.
Constructors
ListWrapper(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
Count
Gets the number of items in the System.Collections.IList.
Declaration
public int Count { get; }
Property Value
Type | Description |
---|---|
System.Int32 |
Methods
IsMarked(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)
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)
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. |
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 |