Class CliTableStyleRecipe
A colour-free table style "recipe": the structural and role-based definition of a table preset
(frame configuration, padding, surface role, and title/frame accent roles). A recipe does not
hard-code colours — it references theme roles and surfaces and resolves to a concrete
CliTableStyle through an ITheme.
The built-in "city" recipes are exposed as static properties (e.g. Roma).
Because this is a record, callers can derive their own from a city recipe with a
with expression, then resolve it:
public static readonly CliTableStyleRecipe InvoiceRecipe =
CliTableStyleRecipe.Roma with { Surface = SurfaceRole.Panel, TitleAccent = TableAccent.Success };
// ...
table.ApplyStyle(InvoiceRecipe.Resolve(theme));
Table styles never use DialogSurface. An elevated table surface comes
from Panel; dialogs/controls keep their own DialogSurface.
public sealed record CliTableStyleRecipe : IEquatable<CliTableStyleRecipe>
- Inheritance
-
CliTableStyleRecipe
- Implements
- Inherited Members
Properties
AfterHeader
Frame segment style for the rule below the header.
public CliFrameSegmentStyle AfterHeader { get; init; }
Property Value
AlternateRecordsEnabled
Whether resolved styles should enable alternate-record rendering by default.
public bool AlternateRecordsEnabled { get; init; }
Property Value
BetweenElements
Frame segment style between columns (vertical) / fields.
public CliFrameSegmentStyle BetweenElements { get; init; }
Property Value
BetweenRecords
Frame segment style between records (zebra rows).
public CliFrameSegmentStyle BetweenRecords { get; init; }
Property Value
Bologna
Bologna — Roma framing on the default surface with a double outer frame, success title. Universal.
public static CliTableStyleRecipe Bologna { get; }
Property Value
FrameAccent
The accent role used for the frame foreground.
public TableAccent FrameAccent { get; init; }
Property Value
Genova
Genova — tight (no-padding) single-line boxed grid on a panel surface, accent title. Universal.
public static CliTableStyleRecipe Genova { get; }
Property Value
HeaderAccent
The accent role used for the header foreground; when Default, the theme's TableHeaderForeground is used.
public TableAccent HeaderAccent { get; init; }
Property Value
HeaderPadding
Optional header padding; when
null, header padding matches Padding.public CliCellPadding? HeaderPadding { get; init; }
Property Value
Join
Junction/join rendering style for the frame.
public CliFrameJoinStyle Join { get; init; }
Property Value
Lucca
Lucca — Milano-based detail view: boxed single-line frame on a panel surface, no between-elements separator, success (green) title, warning (yellow) header. Horizontal only.
public static CliTableStyleRecipe Lucca { get; }
Property Value
Milano
Milano — clean single-line boxed grid on a panel surface, success (green) title, warning (yellow) header. Universal.
public static CliTableStyleRecipe Milano { get; }
Property Value
Napoli
Napoli — full single-line grid with record separators on the default surface, success title. Universal.
public static CliTableStyleRecipe Napoli { get; }
Property Value
OrientationSupport
Which orientations this recipe targets; single-orientation recipes clamp to theirs.
public CliTableStyleOrientationSupport OrientationSupport { get; init; }
Property Value
Outer
Outer frame segment style.
public CliFrameSegmentStyle Outer { get; init; }
Property Value
Padding
Body-cell padding.
public CliCellPadding Padding { get; init; }
Property Value
Palermo
Palermo — attention style: alert surface, warning (yellow) title and frame, alert zebra. Universal.
public static CliTableStyleRecipe Palermo { get; }
Property Value
Parma
Parma — compact vertical list: frameless, columns separated by a single space. Vertical only.
public static CliTableStyleRecipe Parma { get; }
Property Value
Roma
Roma — double outer frame, single header rule and column separators, panel surface, accent title. Universal.
public static CliTableStyleRecipe Roma { get; }
Property Value
Surface
The surface family the table body sits on (resolved via ResolveSurface(SurfaceRole)).
public SurfaceRole Surface { get; init; }
Property Value
TitleAccent
The accent role used for the title foreground.
public TableAccent TitleAccent { get; init; }
Property Value
Torino
Torino — frameless outer with header rule and column separators on the default surface, success title. Universal.
public static CliTableStyleRecipe Torino { get; }
Property Value
Verona
Verona — condensed detail view: frameless, left-padded values, tight header. Horizontal only.
public static CliTableStyleRecipe Verona { get; }
Property Value
Methods
Resolve(ITheme?, CliTableOrientation)
Resolves this recipe into a concrete CliTableStyle using
theme
(the CurrentTheme when null). The requested
orientation is honoured for universal recipes and ignored for
orientation-locked ones. The title is rendered on the base (Default) surface, never on the
table body surface; only the title foreground varies.public CliTableStyle Resolve(ITheme? theme = null, CliTableOrientation orientation = CliTableOrientation.Vertical)
Parameters
themeIThemeorientationCliTableOrientation