Search Results for

    Show / Hide Table of Contents

    Class ListWrapper

    Implements an IListDataSource that renders arbitrary System.Collections.IList instances for ListView.
    Inheritance
    System.Object
    ListWrapper
    Implements
    IListDataSource
    Remarks
    Implements support for rendering marked items.
    Namespace: Terminal.Gui
    Assembly: Terminal.Gui.dll
    Syntax
    public class ListWrapper : Object, IListDataSource

    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

    Length

    Gets the maximum item length in the System.Collections.IList.
    Declaration
    public int Length { 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 trueIf is marked.falseotherwise.

    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 Marks the item.Unmarked the item.The value.

    ToList()

    Returns the source as IList.
    Declaration
    public IList ToList()
    Returns
    Type Description
    System.Collections.IList

    Implements

    IListDataSource
    In This Article
    Back to top Generated by DocFX