Ink.ClipboardPaste Method (Point)
Pastes an IDataObject from the Clipboard to the specified point in this Ink object.
Namespace: Microsoft.Ink
Assembly: Microsoft.Ink (in Microsoft.Ink.dll)
Syntax
'Declaration
<PermissionSetAttribute(SecurityAction.InheritanceDemand, Name := "FullTrust")> _
<UIPermissionAttribute(SecurityAction.Demand, Clipboard := UIPermissionClipboard.AllClipboard)> _
Public Function ClipboardPaste ( _
pt As Point _
) As Strokes
'Usage
Dim instance As Ink
Dim pt As Point
Dim returnValue As Strokes
returnValue = instance.ClipboardPaste(pt)
[PermissionSetAttribute(SecurityAction.InheritanceDemand, Name = "FullTrust")]
[UIPermissionAttribute(SecurityAction.Demand, Clipboard = UIPermissionClipboard.AllClipboard)]
public Strokes ClipboardPaste(
Point pt
)
[PermissionSetAttribute(SecurityAction::InheritanceDemand, Name = L"FullTrust")]
[UIPermissionAttribute(SecurityAction::Demand, Clipboard = UIPermissionClipboard::AllClipboard)]
public:
Strokes^ ClipboardPaste(
Point pt
)
public function ClipboardPaste(
pt : Point
) : Strokes
Parameters
pt
Type: System.Drawing.PointThe point to paste to, in ink space coordinates. The default value is {0, 0}.
Return Value
Type: Microsoft.Ink.Strokes
Returns the Strokes collection that is pasted to the Ink object.
Remarks
An exception is thrown if an unexpected error occurs while accessing the Clipboard. If no error occurs but the Clipboard does not contain a format that can be pasted into an Ink object—either ink serialized format (ISF) or text ink object (tInk)—then this method returns null (Nothing in Microsoft Visual Basic.NET) and no exception is thrown.
Security Note: |
---|
If using under partial trust, this method requires AllClipboard permission. See Security And Trust for more information. |
Examples
This C# example pastes an object from the Clipboard to an InkCollector, theInkCollector, at position (100, 100), in ink space coordinates.
try
{
theInkCollector.Ink.ClipboardPaste(new Point(100, 100));
}
catch
{
// Exception handling code goes here.
}
This Visual Basic .NET example pastes an object from the Clipboard to an InkCollector, theInkCollector, at position (100, 100), in ink space coordinates.
Try
Dim origin As New Point(100, 100)
theInkCollector.Ink.ClipboardPaste(origin)
Catch
'Exception handling code goes here.
End Try
Platforms
Windows 7, Windows Vista, Windows Server 2008 R2, Windows Server 2008
The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.
Version Information
.NET Framework
Supported in: 3.0