# TextViewGenerator.CanCopy Property

> 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.

- **Product:** TX Text Control .NET Server
- **Section:** Reference
- **Kind:** Property
- **Introduced:** 21.0
- **Namespace:** `TXTextControl.ServerVisualisation`
- **Package:** `TXTextControl.TextControl.Core.SDK` (assembly `TXTextControl.Server.Core.dll`, from the private NuGet feed or Text Control Offline Packages)
- **Package:** `TXTextControl.TextControl.ASP.SDK` (assembly `TXTextControl.Server.dll`, from the private NuGet feed or Text Control Offline Packages)
- **.NET Framework:** reference `TXTextControl.Server.dll` from the setup
- **Path:** TX Text Control .NET Server > Reference > TXTextControl.ServerVisualization > TextViewGenerator.CanCopy Property
- **479 words**
- **Web URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol-servervisualization/textviewgenerator/cancopy-property/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol-servervisualization/textviewgenerator/cancopy-property/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol-servervisualization/textviewgenerator/cancopy-property/llms-full.txt

---

### 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](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol/documentpermissions/allowcopy-property/llms-full.txt) property and the currently set [edit mode](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol-servervisualization/textviewgenerator/editmode-property/llms-full.txt).

### Syntax

```csharp
public bool CanCopy { get; }
```

```vbnet
Public ReadOnly Property CanCopy As Boolean
```

### Examples

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

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

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

```vbnet
Dim formattedSelection As Selection = textViewGenerator.Selection
formattedSelection.Bold = True
textViewGenerator.Selection = formattedSelection

If textViewGenerator.CanCopy Then
    textViewGenerator.Copy()
End If
```

### Limitations

Runtime only.

Read only.

---

## Nearby

- **Previous:** [TextViewGenerator.CanCharacterFormat Property](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol-servervisualization/textviewgenerator/cancharacterformat-property/llms-full.txt)
- **Next:** [TextViewGenerator.CanDocumentFormat Property](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol-servervisualization/textviewgenerator/candocumentformat-property/llms-full.txt)
