Table of Contents

Class InkCanvas

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

Note: InkCanvas control is not movable at runtime. This requires complex logic, with no customer scenario at this moment.

public class InkCanvas : UIElement
Inheritance
InkCanvas
Inherited Members
Extension Methods

Constructors

InkCanvas(int, int, int, int)

Initializes a new instance of the InkCanvas class with the specified left, top, width, and height dimensions.

public InkCanvas(int left, int top, int width, int height)

Parameters

left int

The left coordinate of the InkCanvas.

top int

The top coordinate of the InkCanvas.

width int

The width of the InkCanvas.

height int

The height of the InkCanvas.

InkCanvas(int, int, int, int, int)

Initializes a new instance of the InkCanvas class with the specified left, top, width, height, and border width dimensions.

public InkCanvas(int left, int top, int width, int height, int borderWidth)

Parameters

left int

The left coordinate of the InkCanvas.

top int

The top coordinate of the InkCanvas.

width int

The width of the InkCanvas.

height int

The height of the InkCanvas.

borderWidth int

The width of the border around the InkCanvas.

Fields

_bitmap

The Bitmap used for rendering the InkCanvas.

protected Bitmap _bitmap

Field Value

Bitmap

_defaultDrawingAttributes

The default drawing attributes for the InkCanvas.

protected DrawingAttributes _defaultDrawingAttributes

Field Value

DrawingAttributes

Properties

DefaultDrawingAttributes

Gets or sets the default drawing attributes for the InkCanvas.

public DrawingAttributes DefaultDrawingAttributes { get; set; }

Property Value

DrawingAttributes

Methods

Clear()

Clears the InkCanvas.

public void Clear()

Finalize()

Finalizes an instance of the InkCanvas class.

protected override void Finalize()

Init(int, int, int, int, int)

Initializes the InkCanvas with the specified dimensions and border width.

protected virtual void Init(int left, int top, int width, int height, int borderWidth)

Parameters

left int

The left position of the InkCanvas on the screen.

top int

The top position of the InkCanvas on the screen.

width int

The width of the InkCanvas.

height int

The height of the InkCanvas.

borderWidth int

The width of the border around the InkCanvas.

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

Measures the available space for the InkCanvas and sets the desired width and height accordingly.

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

Parameters

availableWidth int

The available width for the InkCanvas.

availableHeight int

The available height for the InkCanvas.

desiredWidth int

The desired width for the InkCanvas.

desiredHeight int

The desired height for the InkCanvas.

OnRender(DrawingContext)

Renders the InkCanvas control.

public override void OnRender(DrawingContext dc)

Parameters

dc DrawingContext

The drawing context to use for rendering.

OnTouchDown(TouchEventArgs)

Handles the touch down event for the InkCanvas.

protected override void OnTouchDown(TouchEventArgs e)

Parameters

e TouchEventArgs

The touch event arguments.

OnTouchUp(TouchEventArgs)

Handles the touch up event for the InkCanvas.

protected override void OnTouchUp(TouchEventArgs e)

Parameters

e TouchEventArgs

The touch event arguments.