Grid

A grid placing children into cells of Rows and Columns (absolute, auto, or star).
public class Grid : Panel

Constructors

Creates an empty grid.

public Grid()

Properties

ColumnSpacing

The gap in points inserted between columns.

Type: double

public double ColumnSpacing { get; set; }

Columns

The column definitions, leading to trailing.

Empty means a single star column.

Type: GridLengthCollection

public GridLengthCollection Columns { get; }

RowSpacing

The gap in points inserted between rows.

Type: double

public double RowSpacing { get; set; }

Rows

The row definitions, top to bottom.

Empty means a single star row.

Type: GridLengthCollection

public GridLengthCollection Rows { get; }

Methods

ArrangeOverride

Content arrangement. Panels override to place their children.

protected override Size ArrangeOverride(
  Size finalSize)
ParameterSummary
Size finalSizeThe final size available for the view's content.

Returns

  • Size: The arranged content size.

MeasureOverride

Content measurement. Panels recurse; controls delegate to the native SizeThatFits.

protected override Size MeasureOverride(
  Size availableSize)
ParameterSummary
Size availableSizeThe size available for the view's content.

Returns

  • Size: The desired content size.