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
intThe left coordinate of the InkCanvas.
top
intThe top coordinate of the InkCanvas.
width
intThe width of the InkCanvas.
height
intThe 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
intThe left coordinate of the InkCanvas.
top
intThe top coordinate of the InkCanvas.
width
intThe width of the InkCanvas.
height
intThe height of the InkCanvas.
borderWidth
intThe width of the border around the InkCanvas.
Fields
_bitmap
The Bitmap used for rendering the InkCanvas.
protected Bitmap _bitmap
Field Value
_defaultDrawingAttributes
The default drawing attributes for the InkCanvas.
protected DrawingAttributes _defaultDrawingAttributes
Field Value
Properties
DefaultDrawingAttributes
Gets or sets the default drawing attributes for the InkCanvas.
public DrawingAttributes DefaultDrawingAttributes { get; set; }
Property Value
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
intThe left position of the InkCanvas on the screen.
top
intThe top position of the InkCanvas on the screen.
width
intThe width of the InkCanvas.
height
intThe height of the InkCanvas.
borderWidth
intThe 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
intThe available width for the InkCanvas.
availableHeight
intThe available height for the InkCanvas.
desiredWidth
intThe desired width for the InkCanvas.
desiredHeight
intThe desired height for the InkCanvas.
OnRender(DrawingContext)
Renders the InkCanvas control.
public override void OnRender(DrawingContext dc)
Parameters
dc
DrawingContextThe drawing context to use for rendering.
OnTouchDown(TouchEventArgs)
Handles the touch down event for the InkCanvas.
protected override void OnTouchDown(TouchEventArgs e)
Parameters
e
TouchEventArgsThe touch event arguments.
OnTouchUp(TouchEventArgs)
Handles the touch up event for the InkCanvas.
protected override void OnTouchUp(TouchEventArgs e)
Parameters
e
TouchEventArgsThe touch event arguments.