Windows.UI.Input.Inking Windows.UI.Input.Inking Windows.UI.Input.Inking Windows.UI.Input.Inking Namespace

Provides input, processing, and management support for Windows Ink apps. This includes:

  • Drawing ink strokes.
  • Capturing strokes.
  • Rendering strokes.
  • Selecting strokes.
  • Deleting strokes.
  • Saving and loading strokes.
  • Converting strokes to text through handwriting recognition.
  • Copying and pasting strokes from the clipboard.
  • Hit testing (or stroke targeting).

Classes

InkDrawingAttributes InkDrawingAttributes InkDrawingAttributes InkDrawingAttributes

Provides properties associated with the drawing of an InkStroke.

InkDrawingAttributesPencilProperties InkDrawingAttributesPencilProperties InkDrawingAttributesPencilProperties InkDrawingAttributesPencilProperties

Provides a set of static InkDrawingAttributes properties for rendering a pencil stroke on an InkCanvas.

Get an instance of this class by calling InkDrawingAttributes.CreateForPencil and accessing InkDrawingAttributes.PencilProperties.

InkInputProcessingConfiguration InkInputProcessingConfiguration InkInputProcessingConfiguration InkInputProcessingConfiguration

Provides properties for managing the input behavior (standard or modified) of the InkPresenter object.

Standard ink input is not modified with a secondary affordance, such as a pen barrel button, right mouse button, or similar.

By default, modified input is processed as standard input and rendered as an InkStroke. You must set RightDragAction to LeaveUnprocessed to pass the input through as UnprocessedInput for custom processing by your app.

InkManager InkManager InkManager InkManager
Note

For Universal Windows app using Extensible Application Markup Language (XAML), we recommend using InkPresenter and the InkCanvas control instead of InkManager.

Provides properties and methods to manage the input, manipulation, and processing (including handwriting recognition) of one or more InkStroke objects.

InkPoint InkPoint InkPoint InkPoint

Provides raw input data for a single point used in the construction of an InkStroke.

InkPresenter InkPresenter InkPresenter InkPresenter
Note

For Universal Windows app using Extensible Application Markup Language (XAML), we recommend using InkPresenter and the InkCanvas control instead of InkManager.

Provides properties, methods, and events for managing the input, processing, and rendering of ink input (standard and modified) for an InkCanvas control.

Note

Standard ink input (pen tip or eraser tip/button) is not modified with a secondary affordance, such as a pen barrel button, right mouse button, or similar (see RightDragAction ).

By default, both standard and modified ink input is managed entirely by the InkPresenter and rendered to the InkCanvas as either an ink stroke or an erase stroke, based on InkInputProcessingConfiguration.Mode.

Modified input can be passed through to your app for processing by setting InkInputProcessingConfiguration.RightDragAction to InkInputRightDragAction.LeaveUnprocessed.

All input can be passed through to your app for processing by setting InkInputProcessingConfiguration.Mode to None.

Leaving input unprocessed by the InkPresenter lets you support a customized ink experience and extended functionality such as selection.

For complete control of ink input and to render it to the Direct2D device context of your Universal Windows app, instead of the default InkCanvas control, call ActivateCustomDrying prior to loading the InkCanvas. This requires an IInkD2DRenderer object to manage the ink input (see the Complex ink sample).

InkPresenterProtractor InkPresenterProtractor InkPresenterProtractor InkPresenterProtractor

Represents a visual stencil, in the form of a protractor for drawing arcs and curves, displayed as a semi-transparent overlay on an InkCanvas.

The stencil transforms how an ink stroke is rendered:

  • It snaps the ink stroke to the stencil edge if the pen tip is within a distance threshold (gutter).
  • It acts as a mask and prevents the drawing of an ink stroke within the area obscured by the stencil.

The InkPresenterRuler can be manipulated both programmatically and by the user. It also scales and translates with the InkCanvas.

InkPresenterRuler InkPresenterRuler InkPresenterRuler InkPresenterRuler

Represents a visual stencil, in the form of a straight rule for drawing straight lines, displayed as a semi-transparent overlay on an InkCanvas.

The stencil transforms how an ink stroke is rendered:

  • It snaps the ink stroke to the stencil edge if the pen tip is within a distance threshold (gutter).
  • It acts as a mask and prevents the drawing of an ink stroke within the area obscured by the stencil.

The InkPresenterRuler can be manipulated both programmatically and by the user. It also scales and translates with the InkCanvas.

InkRecognitionResult InkRecognitionResult InkRecognitionResult InkRecognitionResult

Provides properties and methods to manage InkStroke handwriting recognition data.

Recognition results are produced for each word detected by an InkRecognizer.

InkRecognizer InkRecognizer InkRecognizer InkRecognizer

Manages all aspects of handwriting recognition.

InkRecognizerContainer InkRecognizerContainer InkRecognizerContainer InkRecognizerContainer

Provides properties and methods to manage one or more InkRecognizer objects used for handwriting recognition.

InkRecognizerContainer is null if a recognition engine is not available on the system.

InkStroke InkStroke InkStroke InkStroke

A single ink stroke, including the Bézier curve parameters used for final rendering of the stroke.

InkStrokeBuilder InkStrokeBuilder InkStrokeBuilder InkStrokeBuilder

Builds strokes from raw pointer input.

Note

For Universal Windows app using Extensible Application Markup Language (XAML), we recommend using InkPresenter and the InkCanvas control instead of InkManager.

Use CreateStrokeFromInkPoints and SetDefaultDrawingAttributes to programmatically build strokes for an InkPresenter.

InkStrokeContainer InkStrokeContainer InkStrokeContainer InkStrokeContainer

Provides properties and methods to store and manage the collection of InkStroke objects rendered by the InkPresenter.

Modifications made to any of the ink strokes in the stroke container are immediately rendered to the drawing surface associated with the InkPresenter.

InkStrokeInput InkStrokeInput InkStrokeInput InkStrokeInput

Provides properties and events for StrokeInput associated with an InkPresenter object.

InkStrokeRenderingSegment InkStrokeRenderingSegment InkStrokeRenderingSegment InkStrokeRenderingSegment

A single segment of a complete ink stroke.

A single segment consists of a starting point, an ending point, and two Bezier control points. However, for a series of segments that make up a stroke, the last point of the previous segment is the first point of the current segment. This means that only the ending point for each segment is required to represent a complete stroke.

Each stroke is a vector of InkStrokeRenderingSegment objects with the first segment identified by a single starting point and all remaining segments identified by an ending point and two Bezier control points.

InkStrokesCollectedEventArgs InkStrokesCollectedEventArgs InkStrokesCollectedEventArgs InkStrokesCollectedEventArgs

Contains event data for the StrokesCollected event of the InkPresenter associated with an InkCanvas control.

By default, an ink stroke is processed on a low-latency background thread and rendered wet as it is drawn. When the stroke is completed (pen or finger lifted, or mouse button released), the stroke is processed on the UI thread and rendered dry to the InkCanvas layer (above the application content). If the UI thread is busy, more than one ink stroke might be processed (collected) when the thread becomes available.

This behavior can be overridden by calling the ActivateCustomDrying method prior to loading the InkCanvas.

InkStrokesErasedEventArgs InkStrokesErasedEventArgs InkStrokesErasedEventArgs InkStrokesErasedEventArgs

Contains event data for the StrokesErased event of the InkPresenter associated with an InkCanvas control.

By default, ink stroke data and rendering is managed entirely by the InkCanvas control. However, this behavior can be overridden by calling the ActivateCustomDrying method prior to loading the InkCanvas.

InkSynchronizer InkSynchronizer InkSynchronizer InkSynchronizer

Manages the synchronization of ink input and provides methods for rendering it to the Direct2D device context of your Universal Windows app, instead of the default InkCanvas control. This requires an IInkD2DRenderer object to manage the ink input (see the Complex ink sample).

By default, ink input is processed on a low-latency background thread and rendered "wet" as it is drawn. When the stroke is completed (pen or finger lifted, or mouse button released), the stroke is processed on the UI thread and rendered "dry" to the InkCanvas layer (above the application content and replacing the wet ink).

By calling ActivateCustomDrying (before the InkCanvas is loaded), an app creates an InkSynchronizer object to customize how an ink stroke is rendered dry to a SurfaceImageSource or VirtualSurfaceImageSource. For example, an ink stroke could be rasterized and integrated into application content instead of as a separate InkCanvas layer.

InkUnprocessedInput InkUnprocessedInput InkUnprocessedInput InkUnprocessedInput

Provides properties and events for custom processing of ink data from an InkCanvas control. The data is not processed by the InkPresenter.

Use InkInputProcessingConfiguration to identify the data to pass through as UnprocessedInput.

Interfaces

IInkPointFactory IInkPointFactory IInkPointFactory IInkPointFactory

Defines the implementation for a type that generates InkPoint objects used in the construction of an InkStroke.

IInkPresenterRulerFactory IInkPresenterRulerFactory IInkPresenterRulerFactory IInkPresenterRulerFactory

Defines the implementation for a type that generates InkPresenterRuler objects used in the construction of an InkPresenter.

IInkPresenterStencil IInkPresenterStencil IInkPresenterStencil IInkPresenterStencil

Represents a visual stencil, displayed as an semi-transparent overlay on an InkCanvas.

The stencil transforms how an ink stroke is rendered:

  • It snaps the ink stroke to the stencil edge if the pen tip is within a distance threshold (gutter).
  • It acts as a mask and prevents the drawing of an ink stroke within the area obscured by the stencil.

The stencil can be manipulated both programmatically and by the user. It also scales and translates with the InkCanvas.

IInkRecognizerContainer IInkRecognizerContainer IInkRecognizerContainer IInkRecognizerContainer

Represents one or more InkRecognizer objects.

IInkStrokeContainer IInkStrokeContainer IInkStrokeContainer IInkStrokeContainer

Represents a manager for the collection of InkStroke objects rendered by the InkPresenter.

Modifications made to any of the ink strokes in the stroke container are immediately rendered to the drawing surface associated with the InkPresenter.

Enums

InkDrawingAttributesKind InkDrawingAttributesKind InkDrawingAttributesKind InkDrawingAttributesKind

Specifies the type of InkDrawingAttributes associated with the InkStroke.

InkHighContrastAdjustment InkHighContrastAdjustment InkHighContrastAdjustment InkHighContrastAdjustment

Specifies how the InkPresenter object handles input (standard and modified) from the associated InkCanvas control when system is in high contrast mode.

InkInputProcessingMode InkInputProcessingMode InkInputProcessingMode InkInputProcessingMode

Specifies how the InkPresenter object handles input (standard and modified) from the associated InkCanvas control.

Note

Standard input is not modified with a secondary affordance, such as a pen barrel button, right mouse button, or similar.

Input can be handled as standard ink or erase strokes, or it can be passed as UnprocessedInput through to your app for custom processing.

InkInputRightDragAction InkInputRightDragAction InkInputRightDragAction InkInputRightDragAction

Specifies how the InkPresenter object handles input (standard and modified) from the associated InkCanvas control, when the input is modified with a secondary affordance, such as a pen barrel button, right mouse button, or similar.

By default, modified input is processed as standard input and rendered as an InkStroke (see remarks).

InkManipulationMode InkManipulationMode InkManipulationMode InkManipulationMode

Specifies the modes of ink input.

InkPersistenceFormat InkPersistenceFormat InkPersistenceFormat InkPersistenceFormat

Specifies the formats for saving ink input.

InkPresenterPredefinedConfiguration InkPresenterPredefinedConfiguration InkPresenterPredefinedConfiguration InkPresenterPredefinedConfiguration

Specifies the inking behavior of one or more contact points. Used with SetPredefinedConfiguration.

InkPresenterStencilKind InkPresenterStencilKind InkPresenterStencilKind InkPresenterStencilKind

Specifies the type of stencil that can be displayed on an InkCanvas.

InkRecognitionTarget InkRecognitionTarget InkRecognitionTarget InkRecognitionTarget

Indicates which strokes you want to include in handwriting recognition.

PenTipShape PenTipShape PenTipShape PenTipShape

Identifies the shape of the PenTip.