# DocumentPermissions.AllowFormatting Property

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

- **Product:** TX Text Control .NET for Windows Forms
- **Section:** Reference
- **Kind:** Property
- **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.AllowFormatting Property
- **558 words**
- **Web URL:** https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/documentpermissions/allowformatting-property/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/documentpermissions/allowformatting-property/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/documentpermissions/allowformatting-property/llms-full.txt

---

### Description

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](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/documentpermissions/allowformattingstyles-property/llms-full.txt) property must also be set to true.

### Syntax

```csharp
public bool AllowFormatting { get; set; }
```

```vbnet
Public Property AllowFormatting As Boolean
```

### Examples

The following example configures document permissions for the current document by using `DocumentPermissions.AllowFormatting`.

```csharp
DocumentPermissions documentPermissions = textControl.DocumentPermissions;

documentPermissions.AllowFormatting = true;
if (documentPermissions.AllowFormatting)
{
    Console.WriteLine("Document Permissions: Allow Formatting is enabled.");
}

documentPermissions.ReadOnly = true;
documentPermissions.AllowPrinting = true;
```

```vbnet
Dim documentPermissions As DocumentPermissions = textControl.DocumentPermissions

documentPermissions.AllowFormatting = True
If documentPermissions.AllowFormatting Then
    Console.WriteLine("Document Permissions: Allow Formatting is enabled.")
End If

documentPermissions.ReadOnly = True
documentPermissions.AllowPrinting = True
```

---

## Nearby

- **Previous:** [DocumentPermissions.AllowEditingFormFields Property](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/documentpermissions/alloweditingformfields-property/llms-full.txt)
- **Next:** [DocumentPermissions.AllowFormattingStyles Property](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/documentpermissions/allowformattingstyles-property/llms-full.txt)
