TX Text Control .NET Server

CanCopy Property

Property|Introduced in 21.0
Namespace
TXTextControl.ServerVisualisation
Package
TXTextControl.TextControl.Core.SDK as TXTextControl.Server.Core.dll from the private NuGet feed or Text Control Offline Packages
Also in
TXTextControl.TextControl.ASP.SDK as TXTextControl.Server.dll

Description

Informs whether a part of a 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; }

Examples

The following example applies bold formatting through the text view generator's selection by using TextViewGenerator.CanCopy.

Selection formattedSelection = textViewGenerator.Selection;
formattedSelection.Bold = true;
textViewGenerator.Selection = formattedSelection;

if (textViewGenerator.CanCopy)
{
    textViewGenerator.Copy();
}

Limitations

Runtime only.

Read only.