DaisyTable

Overview

DaisyTable provides a styled table layout with header, body, and footer sections plus row/cell primitives. It supports zebra striping, pinned headers/columns (via the template), row active/hover states, and size presets that adjust padding and font size. Use DaisyTableHead, DaisyTableBody, and DaisyTableFoot to structure content; rows/cells handle layout and styling.

Structure

- DaisyTableHeadDaisyTableRowDaisyTableHeaderCell

- DaisyTableBodyDaisyTableRowDaisyTableCell

- DaisyTableFootDaisyTableRowDaisyTableCell

Table Properties

Property Description
Size ExtraSmall, Small, Medium (default), Large, ExtraLarge; adjusts padding/font via converters.
Zebra (bool) Applies alternate row backgrounds in DaisyTableBody.
PinRows / PinCols (bool) Exposed for sticky headers/columns; template groundwork present.

Row & Cell Properties

Element Property Description
DaisyTableRow IsActive Highlights the row as selected/active.
DaisyTableRow HighlightOnHover Enables hover highlighting.
DaisyTableHeaderCell ColumnWidth GridLength for the column (Star/Absolute/Auto).
DaisyTableCell - Standard content cell.

Quick Examples

<controls:DaisyTable Size="Small" Zebra="True">
    <controls:DaisyTableHead>
        <controls:DaisyTableRow>
            <controls:DaisyTableHeaderCell Content="Name" ColumnWidth="2*" />
            <controls:DaisyTableHeaderCell Content="Role" ColumnWidth="*" />
            <controls:DaisyTableHeaderCell Content="Actions" ColumnWidth="Auto" />
        </controls:DaisyTableRow>
    </controls:DaisyTableHead>

    <controls:DaisyTableBody>
        <controls:DaisyTableRow HighlightOnHover="True">
            <controls:DaisyTableCell Content="Alice" />
            <controls:DaisyTableCell Content="Engineer" />
            <controls:DaisyTableCell>
                <controls:DaisyButton Variant="Ghost" Size="Small" Content="Edit" />
            </controls:DaisyTableCell>
        </controls:DaisyTableRow>
        <controls:DaisyTableRow HighlightOnHover="True" IsActive="True">
            <controls:DaisyTableCell Content="Bob" />
            <controls:DaisyTableCell Content="Designer" />
            <controls:DaisyTableCell>
                <controls:DaisyButton Variant="Ghost" Size="Small" Content="Edit" />
            </controls:DaisyTableCell>
        </controls:DaisyTableRow>
    </controls:DaisyTableBody>
</controls:DaisyTable>

Tips & Best Practices