LayoutExtensions.

Align(Rect, Rect, HorizontalAlignment, VerticalAlignment) Method

Summary

Aligns a rect in a constraining rect according to horizontal and vertical alignment settings.
Namespace
Avalonia.Layout
Containing Type
LayoutExtensions

Syntax

public static Rect Align(this Rect rect, Rect constraint, HorizontalAlignment horizontalAlignment, VerticalAlignment verticalAlignment)

Parameters

Name Type Description
rect Rect The rect to align.
constraint Rect The constraining rect.
horizontalAlignment HorizontalAlignment The horizontal alignment.
verticalAlignment VerticalAlignment The vertical alignment.

Return Value

Type Description
Rect