KeyValueListFluent
ConsoleMonster.Widgets
The fluent methods of KeyValueList, generated from its public properties: A property-named method sets a property and a singular-named method adds to a collection, both returning the same instance.
Inheritance
- object
- KeyValueListFluent
Methods
public static KeyValueList Columns(KeyValueList keyValueList, int value) #Sets KeyValueList.Columns: Preferred number of pairs per row; narrow layouts reduce the count automatically.
Parameters
- keyValueList ConsoleMonster.Widgets.KeyValueList
- The instance.
- value int
- The value.
Examples
// C# initializer or property // C# fluent
new global::ConsoleMonster.Widgets.KeyValueList { Columns = value }; Ui.KeyValue().Columns(value);public static KeyValueList Gap(KeyValueList keyValueList, int value) #Sets KeyValueList.Gap: Cells between the key column and the values (default 2).
Parameters
- keyValueList ConsoleMonster.Widgets.KeyValueList
- The instance.
- value int
- The value.
Examples
// C# initializer or property // C# fluent
new global::ConsoleMonster.Widgets.KeyValueList { Gap = value }; Ui.KeyValue().Gap(value);public static KeyValueList KeyRole(KeyValueList keyValueList, ThemeToken value) #Sets KeyValueList.KeyRole: Theme colour for keys.
Parameters
- keyValueList ConsoleMonster.Widgets.KeyValueList
- The instance.
- value ConsoleMonster.Styling.ThemeToken
- The value.
Examples
// C# initializer or property // C# fluent
new global::ConsoleMonster.Widgets.KeyValueList { KeyRole = value }; Ui.KeyValue().KeyRole(value);public static KeyValueList MaxKeyFraction(KeyValueList keyValueList, double value) #Sets KeyValueList.MaxKeyFraction: Preferred key fraction when the natural label and value widths cannot both fit (default 0.4).
Parameters
- keyValueList ConsoleMonster.Widgets.KeyValueList
- The instance.
- value double
- The value.
Examples
// C# initializer or property // C# fluent
new global::ConsoleMonster.Widgets.KeyValueList { MaxKeyFraction = value }; Ui.KeyValue().MaxKeyFraction(value);public static KeyValueList NumberColumn(KeyValueList keyValueList, ColumnFormat value) #Sets KeyValueList.NumberColumn: Layout of the leading number of each value (234 / 332, 8.4 rules/s, ~12s): when every value starts with a number, the numbers share a column, right-aligned by default, so they line up under each other. A list that mixes in text (a host name, an OS) keeps every value left-aligned as written, so "3 days" under a name is not pushed right. Set the alignment to HorizontalAlignment.Left to always print values as written.
Parameters
- keyValueList ConsoleMonster.Widgets.KeyValueList
- The instance.
- value ConsoleMonster.Layout.ColumnFormat
- The value.
Examples
// C# initializer or property // C# fluent
new global::ConsoleMonster.Widgets.KeyValueList { NumberColumn = value }; Ui.KeyValue().NumberColumn(value);public static KeyValueList NumberColumn(KeyValueList keyValueList, Action<ColumnFormat> configure) #Configures KeyValueList.NumberColumn in place: Layout of the leading number of each value (234 / 332, 8.4 rules/s, ~12s): when every value starts with a number, the numbers share a column, right-aligned by default, so they line up under each other. A list that mixes in text (a host name, an OS) keeps every value left-aligned as written, so "3 days" under a name is not pushed right. Set the alignment to HorizontalAlignment.Left to always print values as written.
Parameters
- keyValueList ConsoleMonster.Widgets.KeyValueList
- The instance.
- configure System.Action<ConsoleMonster.Layout.ColumnFormat>
- Configures the value.
public static KeyValueList Presentation(KeyValueList keyValueList, PresentationOptions value) #Sets KeyValueList.Presentation: Culture, clock and time zone for values added with KeyValueList.Value.
Parameters
- keyValueList ConsoleMonster.Widgets.KeyValueList
- The instance.
- value ConsoleMonster.Presenters.PresentationOptions
- The value.
Examples
// C# initializer or property // C# fluent
new global::ConsoleMonster.Widgets.KeyValueList { Presentation = value }; Ui.KeyValue().Presentation(value);public static KeyValueList Presentation(KeyValueList keyValueList, Action<PresentationOptions> configure) #Configures KeyValueList.Presentation in place (creating it when not set): Culture, clock and time zone for values added with KeyValueList.Value.
Parameters
- keyValueList ConsoleMonster.Widgets.KeyValueList
- The instance.
- configure System.Action<ConsoleMonster.Presenters.PresentationOptions>
- Configures the value.