Skip to main content

Class AspectRatioPanel

A VisualElement that maintains a specific aspect ratio within its parent, automatically resizing and positioning itself according to the configured ratio and balance settings.

[Preserve]
public class AspectRatioPanel : VisualElement

Inheritance​

Constructors​

AspectRatioPanel()​

Creates a new AspectRatioPanel and sets up default positioning.

public AspectRatioPanel()

Properties​

AspectRatioX​

Gets the horizontal component of the target aspect ratio.

public int AspectRatioX { get; }

Property Value​

int

AspectRatioY​

Gets the vertical component of the target aspect ratio.

public int AspectRatioY { get; }

Property Value​

int

BalanceX​

Gets the horizontal alignment within the parent (0-100%).

public int BalanceX { get; }

Property Value​

int

BalanceY​

Gets the vertical alignment within the parent (0-100%).

public int BalanceY { get; }

Property Value​

int