Skip to main content

Canvas Class

NuGet: GHIElectronics.TinyCLR.UI
Assembly: GHIElectronics.TinyCLR.UI
Namespace: GHIElectronics.TinyCLR.UI.Controls

Panel that positions children by explicit left/top/right/bottom anchors.

public class Canvas : Panel

Constructors

Canvas()

public Canvas()

Creates a new Canvas.

Methods

GetBottom(UIElement e)

public static int GetBottom(UIElement e)

Gets the distance between the element's bottom edge and the canvas bottom.

Returns int

SetBottom(UIElement e, int bottom)

public static void SetBottom(UIElement e, int bottom)

Sets the distance between the element's bottom edge and the canvas bottom.

GetLeft(UIElement e)

public static int GetLeft(UIElement e)

Gets the distance between the element's left edge and the canvas left.

Returns int

SetLeft(UIElement e, int left)

public static void SetLeft(UIElement e, int left)

Sets the distance between the element's left edge and the canvas left.

GetRight(UIElement e)

public static int GetRight(UIElement e)

Gets the distance between the element's right edge and the canvas right.

Returns int

SetRight(UIElement e, int right)

public static void SetRight(UIElement e, int right)

Sets the distance between the element's right edge and the canvas right.

GetTop(UIElement e)

public static int GetTop(UIElement e)

Gets the distance between the element's top edge and the canvas top.

Returns int

SetTop(UIElement e, int top)

public static void SetTop(UIElement e, int top)

Sets the distance between the element's top edge and the canvas top.

ArrangeOverride(int arrangeWidth, int arrangeHeight)

protected override void ArrangeOverride(int arrangeWidth, int arrangeHeight)

Arranges children according to their canvas anchors.

MeasureOverride(int availableWidth, int availableHeight, out int desiredWidth, out int desiredHeight)

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

Measures each child with unconstrained space.