Table of Contents

Class Canvas

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

Represents a canvas panel that can be used to arrange child elements using absolute positioning.

public class Canvas : Panel
Inheritance
Canvas
Derived
Inherited Members
Extension Methods

Constructors

Canvas()

Initializes a new instance of the Canvas class.

public Canvas()

Methods

ArrangeOverride(int, int)

Arranges the child elements of the Canvas.

protected override void ArrangeOverride(int arrangeWidth, int arrangeHeight)

Parameters

arrangeWidth int

The width of the area that the Canvas should use to arrange its children.

arrangeHeight int

The height of the area that the Canvas should use to arrange its children.

GetBottom(UIElement)

Gets the value of the Bottom attached property of the specified element.

public static int GetBottom(UIElement e)

Parameters

e UIElement

The element to get the Bottom attached property for.

Returns

int

The value of the Bottom attached property of the specified element.

GetLeft(UIElement)

Gets the value of the Left attached property of the specified element.

public static int GetLeft(UIElement e)

Parameters

e UIElement

The element to get the Left attached property for.

Returns

int

The value of the Left attached property of the specified element.

GetRight(UIElement)

Gets the value of the Right attached property of the specified element.

public static int GetRight(UIElement e)

Parameters

e UIElement

The element to get the Right attached property for.

Returns

int

The value of the Right attached property of the specified element.

GetTop(UIElement)

Gets the value of the Top anchor for the specified UIElement.

public static int GetTop(UIElement e)

Parameters

e UIElement

The UIElement to get the Top anchor value for.

Returns

int

The value of the Top anchor for the specified UIElement.

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

Measures the size required for the child elements of the Canvas.

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

Parameters

availableWidth int

The available width that the Canvas can give to its children.

availableHeight int

The available height that the Canvas can give to its children.

desiredWidth int

The desired width of the Canvas.

desiredHeight int

The desired height of the Canvas.

SetBottom(UIElement, int)

Sets the value of the Bottom attached property of the specified element.

public static void SetBottom(UIElement e, int bottom)

Parameters

e UIElement

The element to set the Bottom attached property for.

bottom int

The value to set for the Bottom attached property.

SetLeft(UIElement, int)

Sets the value of the Left attached property of the specified element.

public static void SetLeft(UIElement e, int left)

Parameters

e UIElement

The element to set the Left attached property for.

left int

The value to set for the Left attached property.

SetRight(UIElement, int)

Sets the value of the Right attached property of the specified element.

public static void SetRight(UIElement e, int right)

Parameters

e UIElement

The element to set the Right attached property for.

right int

The value to set for the Right attached property.

SetTop(UIElement, int)

Sets the value of the Top anchor for the specified UIElement.

public static void SetTop(UIElement e, int top)

Parameters

e UIElement

The UIElement to set the Top anchor value for.

top int

The value to set as the Top anchor for the specified UIElement.