Skip to main content

Container Class

Definition​

Assembly:Avalonia.Base
Package:Avalonia
public class Container

Inheritance: object -> Container

Methods​

NameDescription
GetNameGets the value of the Container.Name attached property.
GetSizingGets the value of the Container.Sizing attached property.
SetNameSets the value of the Container.Name attached property.
SetSizingSets the value of the Container.Name attached property.

GetName Method​

Gets the value of the Container.Name attached property.

public string GetName(Avalonia.Layout.Layoutable layoutable)

Parameters​

layoutable Avalonia.Layout.Layoutable

The layoutable to read the value from.

Returns​

string

The container name of the layoutable

GetSizing Method​

Gets the value of the Container.Sizing attached property.

public Avalonia.Styling.ContainerSizing GetSizing(Avalonia.Layout.Layoutable layoutable)

Parameters​

layoutable Avalonia.Layout.Layoutable

The layoutable to read the value from.

Returns​

Avalonia.Styling.ContainerSizing

The container sizing mode of the layoutable

SetName Method​

Sets the value of the Container.Name attached property.

public void SetName(Avalonia.Layout.Layoutable layoutable, string name)

Parameters​

layoutable Avalonia.Layout.Layoutable

The layoutable to set the value on.

name string

The container name.

SetSizing Method​

Sets the value of the Container.Name attached property.

public void SetSizing(Avalonia.Layout.Layoutable layoutable, Avalonia.Styling.ContainerSizing sizing)

Parameters​

layoutable Avalonia.Layout.Layoutable

The layoutable to set the value on.

sizing Avalonia.Styling.ContainerSizing

The container sizing mode.

Fields​

NameDescription
NamePropertyDefines the Name attached property.
SizingPropertyDefines the Sizing attached property.

NameProperty Field​

Defines the Name attached property.

public Avalonia.AttachedProperty<TValue><string> NameProperty

SizingProperty Field​

Defines the Sizing attached property.

public Avalonia.AttachedProperty<TValue><Avalonia.Styling.ContainerSizing> SizingProperty