Table of Contents

Class WrapPanel

Namespace
Avalonia.Controls
Assembly
Avalonia.Controls.dll

Positions child elements in sequential position from left to right, breaking content to the next line at the edge of the containing box. Subsequent ordering happens sequentially from top to bottom or from right to left, depending on the value of the Orientation property.

public class WrapPanel : Panel, INotifyPropertyChanged, IDataContextProvider, ILogical, IThemeVariantHost, IResourceHost, IResourceNode, IStyleHost, ISetLogicalParent, ISetInheritanceParent, ISupportInitialize, IStyleable, INamed, IInputElement, IDataTemplateHost, ISetterValue, IChildIndexProvider, INavigableContainer
Inheritance
WrapPanel
Implements
Inherited Members
Extension Methods

Constructors

WrapPanel()

public WrapPanel()

Fields

ItemHeightProperty

Defines the ItemHeight property.

public static readonly StyledProperty<double> ItemHeightProperty

Field Value

StyledProperty<double>

ItemSpacingProperty

Defines the ItemSpacing dependency property.

public static readonly StyledProperty<double> ItemSpacingProperty

Field Value

StyledProperty<double>

ItemWidthProperty

Defines the ItemWidth property.

public static readonly StyledProperty<double> ItemWidthProperty

Field Value

StyledProperty<double>

ItemsAlignmentProperty

Defines the ItemsAlignment property.

public static readonly StyledProperty<WrapPanelItemsAlignment> ItemsAlignmentProperty

Field Value

StyledProperty<WrapPanelItemsAlignment>

LineSpacingProperty

Defines the LineSpacing dependency property.

public static readonly StyledProperty<double> LineSpacingProperty

Field Value

StyledProperty<double>

OrientationProperty

Defines the Orientation property.

public static readonly StyledProperty<Orientation> OrientationProperty

Field Value

StyledProperty<Orientation>

Properties

ItemHeight

Gets or sets the height of all items in the WrapPanel.

public double ItemHeight { get; set; }

Property Value

double

ItemSpacing

Gets or sets the spacing between lines.

public double ItemSpacing { get; set; }

Property Value

double

ItemWidth

Gets or sets the width of all items in the WrapPanel.

public double ItemWidth { get; set; }

Property Value

double

ItemsAlignment

Gets or sets the alignment of items in the WrapPanel.

public WrapPanelItemsAlignment ItemsAlignment { get; set; }

Property Value

WrapPanelItemsAlignment

LineSpacing

Gets or sets the spacing between items.

public double LineSpacing { get; set; }

Property Value

double

Orientation

Gets or sets the orientation in which child controls will be laid out.

public Orientation Orientation { get; set; }

Property Value

Orientation

Methods

ArrangeOverride(Size)

Positions child elements as part of a layout pass.

protected override Size ArrangeOverride(Size finalSize)

Parameters

finalSize Size

The size available to the control.

Returns

Size

The actual size used.

MeasureOverride(Size)

Measures the control and its child elements as part of a layout pass.

protected override Size MeasureOverride(Size constraint)

Parameters

constraint Size

Returns

Size

The desired size for the control.