Table of Contents

Class RowStylePattern

Namespace
BlazOrbit.Components
Assembly
BlazOrbit.dll

Defines a styling pattern for rows (DataGrid) or cards (DataCards). CSS-expressible patterns set container-level variables once; custom patterns compute per-item.

public abstract class RowStylePattern
Inheritance
object
RowStylePattern

Constructors

RowStylePattern()

protected RowStylePattern()

Methods

All(string)

Creates a pattern that applies a background color to all rows.

public static RowStylePattern All(string backgroundColor)

Parameters

backgroundColor string

The background color for all rows.

Returns

RowStylePattern

A RowStylePattern that applies to all rows.

Alternating(string?, string?)

Creates an alternating row style pattern.

public static RowStylePattern Alternating(string? evenBackground = null, string? oddBackground = null)

Parameters

evenBackground string

The background color for even rows.

oddBackground string

The background color for odd rows.

Returns

RowStylePattern

A RowStylePattern that alternates row backgrounds.

Custom(Func<int, RowStyle?>)

Creates a custom row style pattern using the specified selector function.

public static RowStylePattern Custom(Func<int, RowStyle?> selector)

Parameters

selector Func<int, RowStyle>

A function that returns a RowStyle for a given row index.

Returns

RowStylePattern

A RowStylePattern that uses custom logic.

EveryNth(int, string)

Creates a pattern that highlights every Nth row.

public static RowStylePattern EveryNth(int n, string backgroundColor)

Parameters

n int

The interval at which rows are highlighted.

backgroundColor string

The background color for highlighted rows.

Returns

RowStylePattern

A RowStylePattern that highlights every Nth row.