In This Article

SizeVariant Class

Defines a size to be applied to a target control within a Ribbon.

public class SizeVariant : VariantBase
Inheritance:
object AvaloniaObject VariantBase object

Constructors

SizeVariant()

Initializes a new instance of the class.

public SizeVariant()

SizeVariant(string, VariantSize)

Initializes a new instance of the class.

public SizeVariant(string targetKey, VariantSize size)
Parameter Type Description
targetKey string

The KeyProperty of the group which is the target of this definition.

size VariantSize

The size to be applied to VariantSizeProperty by this definition.

Properties

Size

The VariantSize to be applied to the target control's VariantSizeProperty by this definition.

public VariantSize Size { get; set; }

Property Value

VariantSize:

The default value is Small.

TargetKey

The string KeyProperty of the target control for this definition.

public string? TargetKey { get; set; }

Property Value

string

Fields

SizeProperty

Defines the Size property.

public static readonly StyledProperty<VariantSize> SizeProperty

TargetKeyProperty

Defines the TargetKey property.

public static readonly StyledProperty<string?> TargetKeyProperty

Inherited Members

Extension Methods