Table of Contents

Class UniformGrid

Namespace
Avalonia.Controls.Primitives
Assembly
Avalonia.Controls.dll

A Panel with uniform column and row sizes.

public class UniformGrid : Panel, INotifyPropertyChanged, IDataContextProvider, ILogical, IThemeVariantHost, IResourceHost, IResourceNode, IStyleHost, ISetLogicalParent, ISetInheritanceParent, ISupportInitialize, IStyleable, INamed, IInputElement, IDataTemplateHost, ISetterValue, IChildIndexProvider
Inheritance
UniformGrid
Implements
Inherited Members
Extension Methods

Constructors

UniformGrid()

public UniformGrid()

Fields

ColumnSpacingProperty

Defines the ColumnSpacing property.

public static readonly StyledProperty<double> ColumnSpacingProperty

Field Value

StyledProperty<double>

ColumnsProperty

Defines the Columns property.

public static readonly StyledProperty<int> ColumnsProperty

Field Value

StyledProperty<int>

FirstColumnProperty

Defines the FirstColumn property.

public static readonly StyledProperty<int> FirstColumnProperty

Field Value

StyledProperty<int>

RowSpacingProperty

Defines the RowSpacing property.

public static readonly StyledProperty<double> RowSpacingProperty

Field Value

StyledProperty<double>

RowsProperty

Defines the Rows property.

public static readonly StyledProperty<int> RowsProperty

Field Value

StyledProperty<int>

Properties

ColumnSpacing

Specifies the spacing between columns.

public double ColumnSpacing { get; set; }

Property Value

double

Columns

Specifies the column count. If set to 0, column count will be calculated automatically.

public int Columns { get; set; }

Property Value

int

FirstColumn

Specifies, for the first row, the column where the items should start.

public int FirstColumn { get; set; }

Property Value

int

RowSpacing

Specifies the spacing between rows.

public double RowSpacing { get; set; }

Property Value

double

Rows

Specifies the row count. If set to 0, row count will be calculated automatically.

public int Rows { get; set; }

Property Value

int

Methods

ArrangeOverride(Size)

Positions child elements as part of a layout pass.

protected override Size ArrangeOverride(Size finalSize)

Parameters

finalSize Size

The size available to the control.

Returns

Size

The actual size used.

MeasureOverride(Size)

Measures the control and its child elements as part of a layout pass.

protected override Size MeasureOverride(Size availableSize)

Parameters

availableSize Size

The size available to the control.

Returns

Size

The desired size for the control.