Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

InkManager.PasteFromClipboard | pasteFromClipboard method

Applies to Windows only

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

Syntax


var rect = inkManager.pasteFromClipboard(position);

Parameters

position

Type: Point

The screen coordinates for the upper-left corner of the bounding rectangle of the clipboard content.

Return value

Type: Rect

The invalidated bounding rectangle of the InkStroke collection.

Remarks

The content of the clipboard must be in Ink Serialized Format (ISF) format.

The InkStroke content from the clipboard is selected. Any existing selection is discarded.

Examples

Here we show how to test whether the content on the clipboard can be added to an InkStroke collection before calling the PasteFromClipboard method.

This example specifies the insertion point for the bounding rectangle at (100, 60), but this can be customized as required.



function paste(evt)
{
    var insertionPoint = {x: 100, y: 60};
    var canPaste = inkManager.canPasteFromClipboard();
    if (canPaste)
    {
        inkManager.pasteFromClipboard(insertionPoint);
        sdkSample.displayStatus("Pasted");
        renderAllStrokes();
    }
    else
    {
        sdkSample.displayStatus("Cannot paste");
    }
}

For the complete example, see Ink App sample.

Requirements

Minimum supported client

Windows 8

Minimum supported server

Windows Server 2012

Minimum supported phone

None supported

Namespace

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

Metadata

Windows.winmd

See also

InkManager
Responding to pen and stylus input
Ink App sample

 

 

Show:
© 2014 Microsoft