Table of Contents

Class DockPanel

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

DockPanel is used to size and position children inward from the edges of available space.

A Dock enum (see SetDock(UIElement, Dock) and GetDock(UIElement)) determines on which size a child is placed. Children are stacked in order from these edges until there is no more space; this happens when previous children have consumed all available space, or a child with Dock set to Fill is encountered.

public class DockPanel : Panel
Inheritance
DockPanel
Inherited Members
Extension Methods

Constructors

DockPanel()

public DockPanel()

Properties

LastChildFill

Gets or sets a value that indicates whether the last child element within a panel stretches to fill the remaining available space.

public bool LastChildFill { get; set; }

Property Value

bool

Methods

ArrangeOverride(int, int)

DockPanel computes a position and final size for each of its children based upon their Dock enum and sizing properties.

protected override void ArrangeOverride(int arrangeWidth, int arrangeHeight)

Parameters

arrangeWidth int

Width that DockPanel will assume to position children.

arrangeHeight int

Height that DockPanel will assume to position children.

GetDock(UIElement)

Reads the pseudo-attached property Dock from the given element.

public static Dock GetDock(UIElement element)

Parameters

element UIElement

UIElement from which to read the pseudo-attached property.

Returns

Dock

The property's value.

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

Updates DesiredSize of the DockPanel. Called by parent UIElement. This is the first pass of layout.

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

Parameters

availableWidth int

An "upper limit" that the return value should not exceed.

availableHeight int

An "upper limit" that the return value should not exceed.

desiredWidth int

The Panel's desired width.

desiredHeight int

The Panel's desired height.

SetDock(UIElement, Dock)

Writes the pseudo-attached property Dock to the given element.

public static void SetDock(UIElement element, Dock dock)

Parameters

element UIElement

UIElement to which to write the attached property.

dock Dock

The property value to set.