Skip to main content

TableColumn<T> class

Namespace: Arlecchino.Widgets.Lists · Assembly: Arlecchino

One column of a table: its heading, what it shows and how it behaves.

public sealed class TableColumn<T>

Constructors

MemberSummary
TableColumn()

Properties

MemberSummary
AlignRightWhether the cell hugs the right edge, which is what numbers want.
CellReads the cell for one row.
HeaderThe heading, as a delegate so it can be localized.
SortHow to order rows by this column. Without it the column cannot be sorted at all, which is how a column of free-form text opts out.
WidthFixed width in columns. Leave at zero to share out whatever the fixed columns leave over.

Constructors in detail

TableColumn()

Obsolete

Constructors of types with required members are not supported in this version of your compiler.

public TableColumn();

Properties in detail

AlignRight

public bool AlignRight { get; init; }

Whether the cell hugs the right edge, which is what numbers want.

Type bool

Cell

public Func<T, string> Cell { get; init; }

Reads the cell for one row.

Type Func<T, TResult><T, string>

public Func<string> Header { get; init; }

The heading, as a delegate so it can be localized.

Type Func<TResult><string>

Sort

public Comparison<T> Sort { get; init; }

How to order rows by this column. Without it the column cannot be sorted at all, which is how a column of free-form text opts out.

Type Comparison<T><T>

Width

public int Width { get; init; }

Fixed width in columns. Leave at zero to share out whatever the fixed columns leave over.

Type int