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