Skip to main content

LayoutHelper Class

Provides helper methods needed for layout.

Definition

Namespace: Avalonia.Layout
Assembly: Avalonia.Base (in Avalonia.Base.dll)

public static class LayoutHelper
View Source
InheritanceObject → LayoutHelper

Properties

LayoutEpsilonEpsilon value used for certain layout calculations. Based on the value in WPF LayoutDoubleUtil.

Methods

ApplyLayoutConstraints(Layoutable, Size)Calculates a control's size based on its Width, Height, MinWidth, MaxWidth, MinHeight and MaxHeight.
ArrangeChild(Layoutable, Size, Thickness) 
ArrangeChild(Layoutable, Size, Thickness, Thickness) 
GetLayoutScale(Layoutable)Obtains layout scale of the given control.
InvalidateSelfAndChildrenMeasure(Layoutable)Invalidates measure for given control and all visual children recursively.
MeasureChild(Layoutable, Size, Thickness) 
MeasureChild(Layoutable, Size, Thickness, Thickness) 
RoundLayoutSizeUp(Size, Double, Double)Rounds a size to integer values for layout purposes, compensating for high DPI screen coordinates by rounding the size up to the nearest pixel.
RoundLayoutThickness(Thickness, Double, Double)Rounds a thickness to integer values for layout purposes, compensating for high DPI screen coordinates.
RoundLayoutValue(Double, Double)Calculates the value to be used for layout rounding at high DPI by rounding the value up or down to the nearest pixel.
RoundLayoutValueUp(Double, Double)Calculates the value to be used for layout rounding at high DPI by rounding the value up to the nearest pixel.

See Also

Reference

Avalonia.Layout Namespace