InkCanvas
InkCanvas
InkCanvas
InkCanvas
Class
Definition
Defines an area that receives and displays all pen input as either an ink stroke or an erase stroke (input from an eraser tip, or the pen tip when modified with an erase button).
public : class InkCanvas : FrameworkElement, IInkCanvaspublic class InkCanvas : FrameworkElement, IInkCanvasPublic Class InkCanvas Inherits FrameworkElement Implements IInkCanvas// This API is not available in Javascript.
<InkCanvas .../>
- Inheritance
- Attributes
| Device family |
Windows 10 (introduced v10.0.10240.0)
|
| API contract |
Windows.Foundation.UniversalApiContract (introduced v1)
|
Inherited Members
Inherited properties
Inherited events
Inherited methods
Remarks
By default, the InkCanvas does not support ink input from devices other than pen. You must specify support for other devices through the InputDeviceTypes of an InkPresenter object.
Associate an InkToolbar with an InkCanvas to provide a customizable and extensible collection of buttons that activate ink-related features in the InkCanvas. By default, the toolbar includes buttons for drawing, erasing, highlighting, and displaying a ruler.
An InkCanvas control is bound to a single instance of an InkPresenter object (exposed through the InkPresenter property). This object provides all default inking functionality exposed by the InkCanvas, along with a comprehensive set of APIs for additional customization.
The configuration of the InkPresenter determines the pointer event handling behavior of the InkCanvas. You must set InkPresenter.InputDeviceTypes to CoreInputDeviceTypes.None for the InkCanvas to process pointer events, otherwise they are passed to the InkPresenter object.
To handle pointer events with the InkPresenter object, you must set RightDragAction to LeaveUnprocessed to pass the input through as UnprocessedInput for custom processing by your app.
Important
The InkPresenter cannot be instantiated directly.
Constructors
InkCanvas() InkCanvas() InkCanvas() InkCanvas()
Initializes a new instance of the InkCanvas class.
public : InkCanvas()public InkCanvas()Public Sub New()// This API is not available in Javascript.
- See Also
-
Properties
InkPresenter InkPresenter InkPresenter InkPresenter
Gets the underlying InkPresenter object associated with the InkCanvas.
Each InkCanvas control is associated with an instance of an InkPresenter object (exposed through the InkPresenter property). The InkPresenter provides properties, methods, and events for managing the input, processing, and rendering of ink data for an InkCanvas control.
The InkPresenter cannot be instantiated directly.
public : InkPresenter InkPresenter { get; }public InkPresenter InkPresenter { get; }Public ReadOnly Property InkPresenter As InkPresenter// This API is not available in Javascript.
The underlying InkPresenter object.
- See Also
-
See Also
- Pen and stylus interactions
- Add an InkToolbar to a Universal Windows Platform (UWP) app
- Get Started Tutorial: Support ink in your UWP app
- FrameworkElement FrameworkElement FrameworkElement FrameworkElement
- Simple ink sample (C#/C++)
- Complex ink sample (C++)
- Ink sample (JavaScript)
- Get Started Tutorial: Support ink in your UWP app
- Coloring book sample
- Family notes sample