LEADTOOLS Annotations for WPF and Silverlight (Leadtools.Windows.Annotations assembly) Send comments on this topic. | Back to Introduction - All Topics | Help Version 17.0.3.31
CanPaste Property
See Also 
Leadtools.Windows.Annotations Namespace > AnnAutomation Class : CanPaste Property



The CanPaste Property supports WPF/Silverlight.

The CanPaste Property is available in LEADTOOLS Document and Medical Imaging toolkits.

Gets a value that indicates whether the clipboard contains annotation objects that can be pasted. Supported in Silverlight, Windows Phone 7

Syntax

Visual Basic (Declaration) 
Public Overridable ReadOnly Property CanPaste As Boolean
Visual Basic (Usage)Copy Code
Dim instance As AnnAutomation
Dim value As Boolean
 
value = instance.CanPaste
C# 
public virtual bool CanPaste {get;}
C++/CLI 
public:
virtual property bool CanPaste {
   bool get();
}

Property Value

true if the clipboard contains annotation objects that can be pasted; false otherwise.

Example

This example determines whether the clipboard contains annotation objects. If it does, it pastes them into the automation

Visual BasicCopy Code
Private Sub AnnAutomation_CanPaste(ByVal automation As AnnAutomation)
   If automation.CanPaste Then
      automation.Paste()
   End If
End Sub
C#Copy Code
private void AnnAutomation_CanPaste(AnnAutomation automation)
{
   if(automation.CanPaste)
      automation.Paste();
}
SilverlightCSharpCopy Code
private void AnnAutomation_CanPaste(AnnAutomation automation)
{
   if (automation.CanPaste)
   {
      // ... paste from Clipboard here...
   }
}
SilverlightVBCopy Code
Private Sub AnnAutomation_CanPaste(ByVal automation As AnnAutomation)
   If automation.CanPaste Then
      ' ... paste from Clipboard here...
   End If
End Sub

Remarks

(Read only) Use this property to update the user interface of your application (for example, enabling or disabling an Edit/Paste menu item). Call the AnnAutomation.Paste method to actually copy the objects from the clipboard to this AnnAutomation.

Requirements

Target Platforms: Silverlight 3.0, Windows XP, Windows Server 2003 family, Windows Server 2008 family, Windows Vista, Windows 7, MAC OS/X (Intel Only)

See Also

CanPaste requires a Document/Medical product license and unlock key. For more information, refer to: Imaging Pro/Document/Medical Features and Unlocking Special LEAD Features.