CanPaste Property
- Namespace
TXTextControl
- Package
TXTextControl.asTextControl. WinForms. SDK TXTextControl.from the private NuGet feed or Text Control Offline PackagesWindows. Forms. dll
Description
Informs whether the clipboard contains a format that can be pasted into a Text Control document. The property's value also depends on the DocumentPermissions.ReadOnly property and the currently set edit mode.
Syntax
public bool CanPaste { get; }Public ReadOnly Property CanPaste As BooleanExamples
The following XAML example shows how to bind the CanPaste property to the IsEnabled attribute of a menu item.
<MenuItem
Header="Paste"
Command="ApplicationCommands.Paste"
IsEnabled="{Binding ElementName=textControl1, Path=CanPaste}" />The following example checks can paste before performing the related operation.
if (textControl.CanPaste)
{
textControl.Paste();
}If textControl.CanPaste Then
textControl.Paste()
End IfLimitations
Runtime only.
Read only.