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
leftintThe left coordinate of the InkCanvas.
topintThe top coordinate of the InkCanvas.
widthintThe width of the InkCanvas.
heightintThe 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
leftintThe left coordinate of the InkCanvas.
topintThe top coordinate of the InkCanvas.
widthintThe width of the InkCanvas.
heightintThe height of the InkCanvas.
borderWidthintThe 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
leftintThe left position of the InkCanvas on the screen.
topintThe top position of the InkCanvas on the screen.
widthintThe width of the InkCanvas.
heightintThe height of the InkCanvas.
borderWidthintThe 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
availableWidthintThe available width for the InkCanvas.
availableHeightintThe available height for the InkCanvas.
desiredWidthintThe desired width for the InkCanvas.
desiredHeightintThe desired height for the InkCanvas.
OnRender(DrawingContext)
Renders the InkCanvas control.
public override void OnRender(DrawingContext dc)
Parameters
dcDrawingContextThe drawing context to use for rendering.
OnTouchDown(TouchEventArgs)
Handles the touch down event for the InkCanvas.
protected override void OnTouchDown(TouchEventArgs e)
Parameters
eTouchEventArgsThe touch event arguments.
OnTouchUp(TouchEventArgs)
Handles the touch up event for the InkCanvas.
protected override void OnTouchUp(TouchEventArgs e)
Parameters
eTouchEventArgsThe touch event arguments.