Table of Contents

Class CliCellStyle

Namespace
ItTiger.TigerCli.Primitives
Assembly
ItTiger.TigerCli.dll
Style information applied to grid cells, rows, columns, and table bands.
public class CliCellStyle
Inheritance
CliCellStyle
Inherited Members

Remarks

Non-null properties participate in the style cascade. Width/height families validate fixed, minimum, and maximum values against each other; character decorations are additive when styles merge.

Constructors

CliCellStyle(CliCharStyle?)

Creates a cell style with an optional character style.
public CliCellStyle(CliCharStyle? charStyle = null)

Parameters

charStyle CliCharStyle?

Properties

CharStyle

Optional character style for foreground, background, decorations, and hyperlinks.
public CliCharStyle? CharStyle { get; set; }

Property Value

CliCharStyle?

EffectiveMaxHeight

Effective maximum height: MaxHeight, then Height, then MaxValue.
public int EffectiveMaxHeight { get; }

Property Value

int

EffectiveMaxWidth

Effective maximum width: MaxWidth, then Width, then MaxValue.
public int EffectiveMaxWidth { get; }

Property Value

int

EffectiveMinHeight

Effective minimum height: MinHeight, then Height, then 0.
public int EffectiveMinHeight { get; }

Property Value

int

EffectiveMinWidth

Effective minimum width: MinWidth, then Width, then 0.
public int EffectiveMinWidth { get; }

Property Value

int

Formatter

Optional value formatter used by raw-formatting paths.
public CliFormatter? Formatter { get; set; }

Property Value

CliFormatter

FormattingMode

Optional formatting mode used before markup parsing.
public CliFormattingMode? FormattingMode { get; set; }

Property Value

CliFormattingMode?

Height

Fixed cell height. Must be compatible with MinHeight and MaxHeight.
public int? Height { get; set; }

Property Value

int?

HorizontalAlignment

Optional horizontal alignment for cell content.
public CliTextAlignment? HorizontalAlignment { get; set; }

Property Value

CliTextAlignment?
Marks the cell's visible value as a hyperlink: when true, the render pipeline derives a hyperlink target once from the cell's full visible text (see CliGrid) unless a text segment already carries an explicit HyperlinkTarget (explicit always wins). Nullable so it participates in the style cascade like other properties. This is metadata only — it never changes colours, layout, or the visible text.
public bool? IsHyperlink { get; set; }

Property Value

bool?

MaxHeight

Maximum cell height. Must not be less than MinHeight or an existing fixed Height.
public int? MaxHeight { get; set; }

Property Value

int?

MaxWidth

Maximum cell width. Must not be less than MinWidth or an existing fixed Width.
public int? MaxWidth { get; set; }

Property Value

int?

MinHeight

Minimum cell height. Must not exceed MaxHeight or an existing fixed Height.
public int? MinHeight { get; set; }

Property Value

int?

MinWidth

Minimum cell width. Must not exceed MaxWidth or an existing fixed Width.
public int? MinWidth { get; set; }

Property Value

int?

NullDisplayValue

Text rendered when a cell value is null.
public string? NullDisplayValue { get; set; }

Property Value

string

Padding

Optional horizontal cell padding.
public CliCellPadding? Padding { get; set; }

Property Value

CliCellPadding?

VerticalAlignment

Optional vertical alignment for cell content.
public CliVerticalAlignment? VerticalAlignment { get; set; }

Property Value

CliVerticalAlignment?

Width

Fixed cell width. Must be compatible with MinWidth and MaxWidth.
public int? Width { get; set; }

Property Value

int?

Wrapping

Optional wrapping/truncation policy.
public CliWrapping? Wrapping { get; set; }

Property Value

CliWrapping

Methods

Clone(CliCellStyle?)

Creates a deep copy of a style, or null when s is null.
public static CliCellStyle? Clone(CliCellStyle? s)

Parameters

s CliCellStyle

Returns

CliCellStyle

IsHeightCompatible(int)

Returns whether a locked height is compatible with this style's height constraints.
public bool IsHeightCompatible(int height)

Parameters

height int

Returns

bool

IsWidthCompatible(int)

Returns whether a locked width is compatible with this style's width constraints.
public bool IsWidthCompatible(int width)

Parameters

width int

Returns

bool

MergeWith(CliCellStyle?)

Returns a new style by applying the specified overrideStyle on top of this style. Non-null values from overrideStyle override this instance.
protected CliCellStyle MergeWith(CliCellStyle? overrideStyle)

Parameters

overrideStyle CliCellStyle

Returns

CliCellStyle