# DocumentPermissions.AllowFormattingStyles Property

> Gets or sets a value specifying whether formatting styles can be used to format the document. The default setting of this property is 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.AllowFormattingStyles Property
- **535 words**
- **Web URL:** https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/documentpermissions/allowformattingstyles-property/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/documentpermissions/allowformattingstyles-property/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/documentpermissions/allowformattingstyles-property/llms-full.txt

---

### Description

Gets or sets a value specifying whether formatting styles can be used to format the document. The default setting of this property is true.

### Syntax

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

```vbnet
Public Property AllowFormattingStyles As Boolean
```

### Examples

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

```csharp
DocumentPermissions documentPermissions = textControl.DocumentPermissions;

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

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

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

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

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

---

## Nearby

- **Previous:** [DocumentPermissions.AllowFormatting Property](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/documentpermissions/allowformatting-property/llms-full.txt)
- **Next:** [DocumentPermissions.AllowPrinting Property](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/documentpermissions/allowprinting-property/llms-full.txt)
