Skip to main content

Grid

A multi-column grid layout. Supports the Grid.Row / Grid.Column / Grid.RowSpan / Grid.ColumnSpan attached properties.

Signature

Attributes

Attached properties

These only affect the direct children of a Grid: As attributes:
As attribute elements:

Runtime behavior

  • Renders as CSS Grid; grid-template-columns is generated from Columns.
  • Without attached properties, cells fill in flow order.
  • Each child is wrapped in a grid item; row and column spans are applied with inline styles.
  • Row height comes from the content and gap; there is no fixed row height.

Example

Gotchas

  • Attached properties have no effect on elements that are not children of a Grid.
  • Row and column indexes start at 0; out-of-range values create implicit tracks per CSS Grid rules, so control them explicitly.
  • There is no auto-dense packing or masonry layout; use List for variable-height lists.