Table of Contents

Class WrapPanel

Namespace
nanoFramework.Presentation.Controls
Assembly
nanoFramework.Graphics.dll

WrapPanel is used to place child UIElements at sequential positions from left to the right and then "wrap" the lines of children from top to the bottom.

All children get the layout partition of size ItemWidth x ItemHeight.

public class WrapPanel : Panel
Inheritance
WrapPanel
Inherited Members
Extension Methods

Constructors

WrapPanel()

public WrapPanel()

Properties

ItemHeight

The ItemWidth and ItemHeight properties specify the size of all items in the WrapPanel. Note that children of WrapPanel may have their own Width/Height properties set - the ItemWidth/ItemHeight specifies the size of "layout partition" reserved by WrapPanel for the child. If this property is not set (equal to 0) - the size of layout partition is equal to DesiredSize of the child element.

public int ItemHeight { get; set; }

Property Value

int

ItemWidth

The ItemWidth and ItemHeight properties specify the size of all items in the WrapPanel. Note that children of WrapPanel may have their own Width/Height properties set - the ItemWidth/ItemHeight specifies the size of "layout partition" reserved by WrapPanel for the child. If this property is not set (equal to 0) - the size of layout partition is equal to DesiredSize of the child element.

public int ItemWidth { get; set; }

Property Value

int

Orientation

Specifies dimension of children positioning in absence of wrapping. Wrapping occurs in orthogonal direction. For example, if Orientation is Horizontal, the items try to form horizontal rows first and if needed are wrapped and form vertical stack of rows. If Orientation is Vertical, items first positioned in a vertical column, and if there is not enough space - wrapping creates additional columns in horizontal dimension.

public Orientation Orientation { get; set; }

Property Value

Orientation

Methods

ArrangeOverride(int, int)

protected override void ArrangeOverride(int arrangeWidth, int arrangeHeight)

Parameters

arrangeWidth int
arrangeHeight int

MeasureOverride(int, int, out int, out int)

protected override void MeasureOverride(int availableWidth, int availableHeight, out int desiredWidth, out int desiredHeight)

Parameters

availableWidth int
availableHeight int
desiredWidth int
desiredHeight int