InkManager class

Applies to Windows only

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

Syntax


var inkManager = new Windows.UI.Input.Inking.InkManager();

Attributes

[DualApiPartition()]
[MarshalingBehavior(None)]
[Threading(Both)]
[Version(0x06020000)]

Members

The InkManager class has these types of members:

Constructors

The InkManager class has these constructors.

ConstructorDescription
InkManager Creates a new InkManager object that is used to manage InkStroke objects.

 

Methods

The InkManager class has these methods. With C#, Visual Basic, and C++, it also inherits methods from the Object class.

MethodDescription
AddStroke Adds one or more InkStroke objects to the collection managed by the InkManager.
CanPasteFromClipboard Identifies whether content on the clipboard can be added to the InkStroke collection that is managed by the InkManager.
CopySelectedToClipboard Copies the selected InkStroke objects (from the InkStroke collection managed by the InkManager) to the clipboard in Ink Serialized Format (ISF) format.
DeleteSelected Deletes the selected InkStroke objects from the InkStroke collection managed by the InkManager.
GetRecognitionResults Gets a collection of potential matches for each word detected by an InkRecognizer during handwriting recognition.
GetRecognizers Gets the collection of handwriting recognizers.
GetStrokes Retrieves all InkStroke objects in the collection managed by the InkManager.
LoadAsync Asynchronously loads all InkStroke objects from the specified stream to the InkStroke collection that is managed by the InkManager.
MoveSelected Moves the selected strokes. All affected strokes are re-rendered.
PasteFromClipboard Adds the InkStroke content from the clipboard to the InkStroke collection that is managed by the InkManager and renders the new strokes..
ProcessPointerDown Processes information about the position and features of the contact point, like pressure and tilt, on initial down contact.
ProcessPointerUp Processes information about the position and features of the contact point, like pressure and tilt, on up contact.
ProcessPointerUpdate Processes position and state properties, such as pressure and tilt, for the specified pointer, from the last pointer event up to and including the current pointer event.
RecognizeAsync(InkRecognitionTarget) Performs handwriting recognition on one or more InkStroke objects.
RecognizeAsync(InkStrokeContainer, InkRecognitionTarget) Performs handwriting recognition on one or more InkStroke objects.
SaveAsync Asynchronously saves all InkStroke objects in the InkStroke collection that is managed by the InkManager to the specified stream.
SelectWithLine Selects all strokes intersected by the new stroke.
SelectWithPolyLine Selects all strokes contained entirely within the polyline.
SetDefaultDrawingAttributes Sets the default InkDrawingAttributes for all new InkStroke objects added to the InkStroke collection that is managed by the InkManager.
SetDefaultRecognizer Sets the default InkRecognizer used for handwriting recognition.
UpdateRecognitionResults Updates the collection of potential text matches from handwriting recognition.

 

Properties

The InkManager class has these properties.

PropertyAccess typeDescription

BoundingRect

Read-onlyGets the bounding rectangle of the InkStroke collection that is managed by the InkManager.

Mode

Read/writeGets or sets the ink input mode.

 

Remarks

Note  : This class is not agile, which means that you need to consider its threading model and marshaling behavior. For more info, see Threading and Marshaling (C++/CX) and Using Windows Runtime objects in a multithreaded environment (.NET).

Examples

This example shows how to create an InkManager object.



var inkManager = new Windows.UI.Input.Inking.InkManager();


The following function demonstrates how to select all ink strokes on a canvas that are part of the stroke collection of this InkManager (inkManager).



function selectAll()
{
    inkManager.getStrokes().forEach(
        function (stroke) 
        {
            stroke.selected = 1;
        }
    );
}


For the complete example, see Ink App sample.

Requirements

Minimum supported client

Windows 8 [Windows Store apps, desktop apps]

Minimum supported server

Windows Server 2012 [Windows Store apps, desktop apps]

Minimum supported phone

None supported

Namespace

Windows.UI.Input.Inking
Windows::UI::Input::Inking [C++]

Metadata

Windows.winmd

See also

Windows.UI.Input.Inking Classes
Responding to pen and stylus input
Ink App sample

 

 

Show:
© 2014 Microsoft