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
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
intWidth that DockPanel will assume to position children.
arrangeHeight
intHeight 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
UIElementUIElement 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
intAn "upper limit" that the return value should not exceed.
availableHeight
intAn "upper limit" that the return value should not exceed.
desiredWidth
intThe Panel's desired width.
desiredHeight
intThe 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)