# DocumentPermissions Class

> The DocumentPermissions class provides settings determining how the document can be edited, when the EditMode is changed from Edit to ReadAndSelect.

- **Product:** TX Text Control .NET for Windows Forms
- **Section:** Reference
- **Kind:** Class
- **Introduced:** 25.0
- **Namespace:** `TXTextControl`
- **Package:** `TXTextControl.TextControl.WinForms.SDK` (assembly `TXTextControl.dll`, from the private NuGet feed or Text Control Offline Packages)
- **.NET Framework:** reference `TXTextControl.dll` from the setup
- **Path:** TX Text Control .NET for Windows Forms > Reference > TXTextControl > DocumentPermissions Class
- **799 words**
- **Web URL:** https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/documentpermissions/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/documentpermissions/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/documentpermissions/llms-full.txt

---

### Description

The DocumentPermissions class provides settings determining how the document can be edited, when the [EditMode](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/textcontrol/editmode-property/llms-full.txt) is changed from `Edit` to `ReadAndSelect`.

### Syntax

```csharp
public class DocumentPermissions
```

```vbnet
Public Class DocumentPermissions
```

### Examples

The following example configures document permissions for the current document.

```csharp
DocumentPermissions documentPermissions = textControl.DocumentPermissions;
documentPermissions.ReadOnly = true;
documentPermissions.AllowPrinting = true;
```

```vbnet
Dim documentPermissions As DocumentPermissions = textControl.DocumentPermissions
documentPermissions.ReadOnly = True
documentPermissions.AllowPrinting = True
```

---

## In This Section

- [DocumentPermissions.AllowCopy Property](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/documentpermissions/allowcopy-property/llms-full.txt): Specifies whether document content can be copied to the clipboard. The default setting of this property is true.
- [DocumentPermissions.AllowEditingFormFields Property](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/documentpermissions/alloweditingformfields-property/llms-full.txt): Specifies whether form fields can be edited. The default setting of this property is true.
- [DocumentPermissions.AllowFormatting Property](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/documentpermissions/allowformatting-property/llms-full.txt): Gets or sets a value specifying whether the document can be formatted. The default setting of this property is true. To use formatting styles, the AllowFormattingStyles property must also be set to true.
- [DocumentPermissions.AllowFormattingStyles Property](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/documentpermissions/allowformattingstyles-property/llms-full.txt): Gets or sets a value specifying whether formatting styles can be used to format the document. The default setting of this property is true.
- [DocumentPermissions.AllowPrinting Property](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/documentpermissions/allowprinting-property/llms-full.txt): Gets or sets a value specifying whether the document can be printed. The default setting of this property is true.
- [DocumentPermissions.ReadOnly Property](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/documentpermissions/readonly-property/llms-full.txt): Gets or sets a value specifying whether the document is read only. Neither the document's text can be changed nor the document can be formatted. The default setting of this property is true.

---

## Nearby

- **Previous:** [DocumentLinkEventArgs.DocumentLink Property](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/documentlinkeventargs/documentlink-property/llms-full.txt)
- **Next:** [DocumentPermissions.AllowCopy Property](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/documentpermissions/allowcopy-property/llms-full.txt)
