InkStrokeContainer InkStrokeContainer InkStrokeContainer InkStrokeContainer InkStrokeContainer Class

Definition

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.

public : sealed class InkStrokeContainer : IInkStrokeContainer, IInkStrokeContainer2, IInkStrokeContainer3
struct winrt::Windows::UI::Input::Inking::InkStrokeContainer : IInkStrokeContainer, IInkStrokeContainer2, IInkStrokeContainer3
public sealed class InkStrokeContainer : IInkStrokeContainer, IInkStrokeContainer2, IInkStrokeContainer3
Public NotInheritable Class InkStrokeContainer Implements IInkStrokeContainer, IInkStrokeContainer2, IInkStrokeContainer3
var inkStrokeContainer = new inkStrokeContainer();
Attributes
Windows 10 requirements
Device family
Windows 10 (introduced v10.0.10240.0 - for Xbox, see UWP features that aren't yet supported on Xbox)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)

Remarks

For ink recognition, use an InkRecognizerContainer object.

The StrokesCollected event is fired when ink strokes are processed ("wet" to "dry") on the UI thread.

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).

Constructors

InkStrokeContainer() InkStrokeContainer() InkStrokeContainer() InkStrokeContainer() InkStrokeContainer()

Initializes a new InkStrokeContainer object that is used to manage InkStroke objects.

Properties

BoundingRect BoundingRect BoundingRect BoundingRect BoundingRect

Gets the bounding rectangle of the InkStroke collection managed by the InkStrokeContainer.

Methods

AddStroke(InkStroke) AddStroke(InkStroke) AddStroke(InkStroke) AddStroke(InkStroke) AddStroke(InkStroke)

Adds an InkStroke object to the collection managed by the InkStrokeContainer.

An InkStroke cannot exist in more than one InkStrokeContainer. Call the Clone method to duplicate a stroke in another container.

AddStrokes(IIterable<InkStroke>) AddStrokes(IIterable<InkStroke>) AddStrokes(IIterable<InkStroke>) AddStrokes(IIterable<InkStroke>) AddStrokes(IIterable<InkStroke>)

Adds one or more ink strokes to the collection managed by the InkStrokeContainer.

An InkStroke cannot exist in more than one InkStrokeContainer. Call the Clone method to duplicate a stroke in another container.

CanPasteFromClipboard() CanPasteFromClipboard() CanPasteFromClipboard() CanPasteFromClipboard() CanPasteFromClipboard()

Identifies whether content on the clipboard can be added to the InkStroke collection managed by the InkStrokeContainer.

Note

Clipboard content must be in Ink Serialized Format (ISF).

Clear() Clear() Clear() Clear() Clear()

Deletes all InkStroke objects from the collection managed by the InkStrokeContainer.

CopySelectedToClipboard() CopySelectedToClipboard() CopySelectedToClipboard() CopySelectedToClipboard() CopySelectedToClipboard()

Copies the selected InkStroke objects (from the InkStroke collection managed by the InkStrokeContainer ) to the clipboard in Ink Serialized Format (ISF) format.

DeleteSelected() DeleteSelected() DeleteSelected() DeleteSelected() DeleteSelected()

Deletes the selected InkStroke objects from the InkStroke collection managed by the InkStrokeContainer.

GetRecognitionResults() GetRecognitionResults() GetRecognitionResults() GetRecognitionResults() GetRecognitionResults()

Gets the collection of recognition matches previously processed by an InkRecognizer and stored in an InkRecognizerContainer.

Recognition is not supported by InkStrokeContainer, you must use an InkRecognizerContainer object.

GetStrokeById(UInt32) GetStrokeById(UInt32) GetStrokeById(UInt32) GetStrokeById(UInt32) GetStrokeById(UInt32)

Retrieves the single InkStroke with the specified ID.

GetStrokes() GetStrokes() GetStrokes() GetStrokes() GetStrokes()

Retrieves all ink strokes in the collection managed by the InkStrokeContainer.

LoadAsync(IInputStream) LoadAsync(IInputStream) LoadAsync(IInputStream) LoadAsync(IInputStream) LoadAsync(IInputStream)

Asynchronously loads all InkStroke objects from the specified stream to the InkStroke collection that is managed by the InkStrokeContainer.

All existing strokes in the InkStrokeContainer are cleared before new strokes are loaded.

MoveSelected(Point) MoveSelected(Point) MoveSelected(Point) MoveSelected(Point) MoveSelected(Point)

Moves the selected strokes. All affected strokes are re-rendered.

PasteFromClipboard(Point) PasteFromClipboard(Point) PasteFromClipboard(Point) PasteFromClipboard(Point) PasteFromClipboard(Point)

Adds the InkStroke content from the clipboard to the InkStroke collection that is managed by the InkStrokeContainer and renders the new strokes..

SaveAsync(IOutputStream) SaveAsync(IOutputStream) SaveAsync(IOutputStream) SaveAsync(IOutputStream) SaveAsync(IOutputStream)

Asynchronously saves all InkStroke objects in the InkStroke collection that is managed by the InkStrokeContainer to the specified stream.

SaveAsync(IOutputStream, InkPersistenceFormat) SaveAsync(IOutputStream, InkPersistenceFormat) SaveAsync(IOutputStream, InkPersistenceFormat) SaveAsync(IOutputStream, InkPersistenceFormat) SaveAsync(IOutputStream, InkPersistenceFormat)

Asynchronously saves all InkStroke objects in the InkStroke collection that is managed by the InkStrokeContainer to the specified stream and in the specified format.

SelectWithLine(Point, Point) SelectWithLine(Point, Point) SelectWithLine(Point, Point) SelectWithLine(Point, Point) SelectWithLine(Point, Point)

Selects all strokes intersected by the new stroke.

Note

The Selected flag is reset for all other strokes in the collection.

SelectWithPolyLine(IIterable<Point>) SelectWithPolyLine(IIterable<Point>) SelectWithPolyLine(IIterable<Point>) SelectWithPolyLine(IIterable<Point>) SelectWithPolyLine(IIterable<Point>)

Selects all strokes contained entirely within the polyline.

Note

The Selected flag is reset for all other strokes in the collection.

.

UpdateRecognitionResults(IVectorView<InkRecognitionResult>) UpdateRecognitionResults(IVectorView<InkRecognitionResult>) UpdateRecognitionResults(IVectorView<InkRecognitionResult>) UpdateRecognitionResults(IVectorView<InkRecognitionResult>) UpdateRecognitionResults(IVectorView<InkRecognitionResult>)

Updates the collection of recognition matches previously processed by an InkRecognizer and stored in an InkRecognizerContainer.

Recognition is not supported by InkStrokeContainer, you must use an InkRecognizerContainer object.

See Also