Skip to main content

StretchDirection Enum

Definition

Namespace:Avalonia.Media
Assembly:Avalonia.Base
Package:Avalonia

Describes the type of scaling that can be used when scaling content.

public enum StretchDirection

Inheritance: Enum -> StretchDirection

Fields

NameDescription
BothAlways stretches to fit the available space according to the stretch mode.
DownOnlyOnly scales the content downwards when the content is larger than the available space. If the content is smaller, no scaling upwards is done.
UpOnlyOnly scales the content upwards when the content is smaller than the available space. If the content is larger, no scaling downwards is done.

Both Field

Always stretches to fit the available space according to the stretch mode.

public Avalonia.Media.StretchDirection Both

DownOnly Field

Only scales the content downwards when the content is larger than the available space. If the content is smaller, no scaling upwards is done.

public Avalonia.Media.StretchDirection DownOnly

UpOnly Field

Only scales the content upwards when the content is smaller than the available space. If the content is larger, no scaling downwards is done.

public Avalonia.Media.StretchDirection UpOnly