API Reference
TableColumn
A table column definition: header, width rules, overflow, priority (which columns hide first when space is short), a presenter for raw values, tone rules and how the column is summarised in subtotals and totals. The same column definitions drive record cards and record views, so a dataset is described once.
Inheritance
- Object
- TableColumn
Usage
Explore 72 API references to this type
This type appears in these public API surfaces even when no hand-authored example is attached directly to the page.
Returned or exposed by 35
- Property Grid.Columns
- Property Table.Columns
- Extension method TableColumn.AddToneRule
- Extension method TableColumn.AddToneRules
- Extension method TableColumn.WithAggregate
- Extension method TableColumn.WithAlignment
- Extension method TableColumn.WithFlexible
- Extension method TableColumn.WithHeader
- Extension method TableColumn.WithIsKey
- Extension method TableColumn.WithKey
- Extension method TableColumn.WithMaxLines
- Extension method TableColumn.WithMaxWidth
- Extension method TableColumn.WithMinWidth
- Extension method TableColumn.WithOverflow
- Extension method TableColumn.WithPresenter
- Extension method TableColumn.WithPriority
- Extension method TableColumn.WithWidth
- Extension method TableColumn.WithWrap
- Method TableColumnFluent.AddToneRule
- Method TableColumnFluent.AddToneRules
- Method TableColumnFluent.WithAggregate
- Method TableColumnFluent.WithAlignment
- Method TableColumnFluent.WithFlexible
- Method TableColumnFluent.WithHeader
- Method TableColumnFluent.WithIsKey
- Method TableColumnFluent.WithKey
- Method TableColumnFluent.WithMaxLines
- Method TableColumnFluent.WithMaxWidth
- Method TableColumnFluent.WithMinWidth
- Method TableColumnFluent.WithOverflow
- Method TableColumnFluent.WithPresenter
- Method TableColumnFluent.WithPriority
- Method TableColumnFluent.WithWidth
- Method TableColumnFluent.WithWrap
- Property Table.Columns
Accepted by parameters 37
- Method Grid.AddColumn
- Method Table.AddColumn
- Extension method TableColumn.AddToneRule
- Extension method TableColumn.AddToneRules
- Extension method TableColumn.WithAggregate
- Extension method TableColumn.WithAlignment
- Extension method TableColumn.WithFlexible
- Extension method TableColumn.WithHeader
- Extension method TableColumn.WithIsKey
- Extension method TableColumn.WithKey
- Extension method TableColumn.WithMaxLines
- Extension method TableColumn.WithMaxWidth
- Extension method TableColumn.WithMinWidth
- Extension method TableColumn.WithOverflow
- Extension method TableColumn.WithPresenter
- Extension method TableColumn.WithPriority
- Extension method TableColumn.WithWidth
- Extension method TableColumn.WithWrap
- Method TableColumnFluent.AddToneRule
- Method TableColumnFluent.AddToneRules
- Method TableColumnFluent.WithAggregate
- Method TableColumnFluent.WithAlignment
- Method TableColumnFluent.WithFlexible
- Method TableColumnFluent.WithHeader
- Method TableColumnFluent.WithIsKey
- Method TableColumnFluent.WithKey
- Method TableColumnFluent.WithMaxLines
- Method TableColumnFluent.WithMaxWidth
- Method TableColumnFluent.WithMinWidth
- Method TableColumnFluent.WithOverflow
- Method TableColumnFluent.WithPresenter
- Method TableColumnFluent.WithPriority
- Method TableColumnFluent.WithWidth
- Method TableColumnFluent.WithWrap
- Method TableFluent.AddColumn``1
- Method Table.AddColumn
- Method Table.Column
Constructors
Inherited Methods
public virtual Boolean Equals(Object? obj) #BooleanParameters
- obj Object?
Properties
public String? Key { get; set; } #An identifier for the column (a property name), or null to use the header.
public HorizontalAlignment? Alignment { get; set; } #Alignment; null = automatic (right for numeric columns, left otherwise). The header follows it.
public Boolean Wrap { get; set; } #Whether values may wrap onto several lines when space is short (default true). Setting it maps to TableColumn.Overflow: true is ColumnOverflow.Wrap, false is ColumnOverflow.Never (identifiers keep their width while other columns give way).
public ColumnOverflow Overflow { get; set; } #What happens to values wider than the column: wrap (default), truncate at the end, truncate in the middle, or never shorten.
public Int32 MaxLines { get; set; } #The most lines a wrapped value may use (0 = unlimited); the last line ends with an ellipsis when cut.
public Int32 Priority { get; set; } #The column's importance when the table is too wide: columns with the lowest priority hide first (ties hide from the right). The default is 0. Key columns never hide.
public Boolean IsKey { get; set; } #Whether this is a key column: it never hides, and it titles the record cards.
public Boolean Flexible { get; set; } #Whether this column takes spare width when the table expands (the main text column).
public ICellPresenter? Presenter { get; set; } #How raw cell values are shown, or null for automatic (by value type). Markup cells are shown as written.
public IList<ToneRule> ToneRules { get; } #Conditional tone rules for raw values; the first matching rule wins.
public ColumnAggregate Aggregate { get; set; } #How the column is summarised in group subtotals and the totals row.
public String Id { get; } #The identifier: TableColumn.Key, or the header without markup.
Extension Methods
public static TableColumn AddToneRule(TableColumn tableColumn, ToneRule item) #TableColumnAdds an item to TableColumn.ToneRules: Conditional tone rules for raw values; the first matching rule wins.
Parameters
- tableColumn ConsoleMonster.Widgets.TableColumn
- The instance.
- item ConsoleMonster.Presenters.ToneRule
- The item.
Returns
The same instance.
public static TableColumn AddToneRules(TableColumn tableColumn, params ToneRule[] items) #TableColumnAdds items to TableColumn.ToneRules: Conditional tone rules for raw values; the first matching rule wins.
Parameters
- tableColumn ConsoleMonster.Widgets.TableColumn
- The instance.
- items ConsoleMonster.Presenters.ToneRule[]
- The items, in order.
Returns
The same instance.
public static TableColumn AddToneRules(TableColumn tableColumn, IEnumerable<ToneRule> items) #TableColumnAdds items to TableColumn.ToneRules: Conditional tone rules for raw values; the first matching rule wins.
Parameters
- tableColumn ConsoleMonster.Widgets.TableColumn
- The instance.
- items System.Collections.Generic.IEnumerable<ConsoleMonster.Presenters.ToneRule>
- The items, in order.
Returns
The same instance.
public static TableColumn WithAggregate(TableColumn tableColumn, ColumnAggregate value) #TableColumnSets TableColumn.Aggregate: How the column is summarised in group subtotals and the totals row.
Parameters
- tableColumn ConsoleMonster.Widgets.TableColumn
- The instance.
- value ConsoleMonster.Widgets.ColumnAggregate
- The value.
Returns
The same instance.
public static TableColumn WithAlignment(TableColumn tableColumn, HorizontalAlignment? value) #TableColumnSets TableColumn.Alignment: Alignment; null = automatic (right for numeric columns, left otherwise). The header follows it.
Parameters
- tableColumn ConsoleMonster.Widgets.TableColumn
- The instance.
- value ConsoleMonster.Layout.HorizontalAlignment?
- The value.
Returns
The same instance.
public static TableColumn WithFlexible(TableColumn tableColumn, Boolean value = true) #TableColumnSets TableColumn.Flexible: Whether this column takes spare width when the table expands (the main text column).
Parameters
- tableColumn ConsoleMonster.Widgets.TableColumn
- The instance.
- value System.Boolean = true
- The value (default true).
Returns
The same instance.
public static TableColumn WithHeader(TableColumn tableColumn, String value) #TableColumnSets TableColumn.Header: The header (markup).
Parameters
- tableColumn ConsoleMonster.Widgets.TableColumn
- The instance.
- value System.String
- The value.
Returns
The same instance.
public static TableColumn WithIsKey(TableColumn tableColumn, Boolean value = true) #TableColumnSets TableColumn.IsKey: Whether this is a key column: it never hides, and it titles the record cards.
Parameters
- tableColumn ConsoleMonster.Widgets.TableColumn
- The instance.
- value System.Boolean = true
- The value (default true).
Returns
The same instance.
public static TableColumn WithKey(TableColumn tableColumn, String? value) #TableColumnSets TableColumn.Key: An identifier for the column (a property name), or null to use the header.
Parameters
- tableColumn ConsoleMonster.Widgets.TableColumn
- The instance.
- value System.String?
- The value.
Returns
The same instance.
public static TableColumn WithMaxLines(TableColumn tableColumn, Int32 value) #TableColumnSets TableColumn.MaxLines: The most lines a wrapped value may use (0 = unlimited); the last line ends with an ellipsis when cut.
Parameters
- tableColumn ConsoleMonster.Widgets.TableColumn
- The instance.
- value System.Int32
- The value.
Returns
The same instance.
public static TableColumn WithMaxWidth(TableColumn tableColumn, Int32? value) #TableColumnSets TableColumn.MaxWidth: A maximum width, or null.
Parameters
- tableColumn ConsoleMonster.Widgets.TableColumn
- The instance.
- value System.Int32?
- The value.
Returns
The same instance.
public static TableColumn WithMinWidth(TableColumn tableColumn, Int32? value) #TableColumnSets TableColumn.MinWidth: A minimum width, or null.
Parameters
- tableColumn ConsoleMonster.Widgets.TableColumn
- The instance.
- value System.Int32?
- The value.
Returns
The same instance.
public static TableColumn WithOverflow(TableColumn tableColumn, ColumnOverflow value) #TableColumnSets TableColumn.Overflow: What happens to values wider than the column: wrap (default), truncate at the end, truncate in the middle, or never shorten.
Parameters
- tableColumn ConsoleMonster.Widgets.TableColumn
- The instance.
- value ConsoleMonster.Widgets.ColumnOverflow
- The value.
Returns
The same instance.
public static TableColumn WithPresenter(TableColumn tableColumn, ICellPresenter? value) #TableColumnSets TableColumn.Presenter: How raw cell values are shown, or null for automatic (by value type). Markup cells are shown as written.
Parameters
- tableColumn ConsoleMonster.Widgets.TableColumn
- The instance.
- value ConsoleMonster.Presenters.ICellPresenter?
- The value.
Returns
The same instance.
public static TableColumn WithPriority(TableColumn tableColumn, Int32 value) #TableColumnSets TableColumn.Priority: The column's importance when the table is too wide: columns with the lowest priority hide first (ties hide from the right). The default is 0. Key columns never hide.
Parameters
- tableColumn ConsoleMonster.Widgets.TableColumn
- The instance.
- value System.Int32
- The value.
Returns
The same instance.
public static TableColumn WithWidth(TableColumn tableColumn, Int32? value) #TableColumnSets TableColumn.Width: A fixed width, or null.
Parameters
- tableColumn ConsoleMonster.Widgets.TableColumn
- The instance.
- value System.Int32?
- The value.
Returns
The same instance.
public static TableColumn WithWrap(TableColumn tableColumn, Boolean value = true) #TableColumnSets TableColumn.Wrap: Whether values may wrap onto several lines when space is short (default true). Setting it maps to TableColumn.Overflow: true is ColumnOverflow.Wrap, false is ColumnOverflow.Never (identifiers keep their width while other columns give way).
Parameters
- tableColumn ConsoleMonster.Widgets.TableColumn
- The instance.
- value System.Boolean = true
- The value (default true).
Returns
The same instance.