TableCell
Namespace: Hex1b.Widgets
Assembly: Hex1b.dll
Represents a cell definition in a table, containing either text or a widget builder.
csharp
public record TableCell : IEquatable<TableCell>Inheritance
Object → TableCell
Implements
Properties
Alignment
The horizontal alignment for cell content. Only respected when set on header cells.
Returns: Alignment
csharp
public Alignment Alignment { get; init; }Text
The text content of the cell. Mutually exclusive with WidgetBuilder.
Returns: String
csharp
public string? Text { get; init; }WidgetBuilder
A builder function to create a widget for this cell. Mutually exclusive with Text.
Returns: Func<TableCellContext, Hex1bWidget>
csharp
public Func<TableCellContext, Hex1bWidget>? WidgetBuilder { get; init; }Width
The width hint for this column. Only respected when set on header cells.
Returns: Nullable<SizeHint>
csharp
public SizeHint? Width { get; init; }Methods
FromText(string)
Creates a text cell.
Parameters:
text(String):
Returns: TableCell
csharp
public static TableCell FromText(string text)FromWidget(Func<TableCellContext, Hex1bWidget>)
Creates a widget cell.
Parameters:
builder(Func<TableCellContext, Hex1bWidget>):
Returns: TableCell
csharp
public static TableCell FromWidget(Func<TableCellContext, Hex1bWidget> builder)