InkManager.PasteFromClipboard(Point) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Note
For Universal Windows app using Extensible Application Markup Language (XAML), we recommend using InkPresenter and the InkCanvas control instead of InkManager.
Adds the InkStroke content from the clipboard to the InkStroke collection that is managed by the InkManager and renders the new strokes..
public:
virtual Rect PasteFromClipboard(Point position) = PasteFromClipboard;
Rect PasteFromClipboard(Point const& position);
public Rect PasteFromClipboard(Point position);
function pasteFromClipboard(position)
Public Function PasteFromClipboard (position As Point) As Rect
Parameters
- position
- Point
The screen coordinates for the upper-left corner of the bounding rectangle of the clipboard content.
Returns
The invalidated bounding rectangle of the InkStroke collection.
Implements
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");
}
}
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.
Applies to
See also
- Pen and stylus interactions
- Get started: Support ink in your UWP app
- Ink analysis sample (basic) (C#)
- Ink handwriting recognition sample (C#)
- Save and load ink strokes from an Ink Serialized Format (ISF) file
- Save and load ink strokes from the clipboard
- Ink toolbar location and orientation sample (basic)
- Ink toolbar location and orientation sample (dynamic)
- Coloring book sample
- Family notes sample
- Inking sample (JavaScript)
- Simple inking sample (C#/C++)
- Complex inking sample (C++)
- Ink analysis sample