# TextViewGenerator.CanStyleFormat Property

> Informs whether the document can be formatted with formatting styles. The property's value depends on the DocumentPermissions.AllowFormattingStyles property and the currently set edit mode.

- **Product:** TX Text Control .NET Server
- **Section:** Reference
- **Kind:** Property
- **Introduced:** 25.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.CanStyleFormat Property
- **516 words**
- **Web URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol-servervisualization/textviewgenerator/canstyleformat-property/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol-servervisualization/textviewgenerator/canstyleformat-property/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol-servervisualization/textviewgenerator/canstyleformat-property/llms-full.txt

---

### Description

Informs whether the document can be formatted with formatting styles. The property's value depends on the [DocumentPermissions.AllowFormattingStyles](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol/documentpermissions/allowformattingstyles-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 CanStyleFormat { get; }
```

```vbnet
Public ReadOnly Property CanStyleFormat As Boolean
```

### Examples

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

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

if (textViewGenerator.CanStyleFormat)
{
    Console.WriteLine("Text View Generator is ready for this operation.");
}
```

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

If textViewGenerator.CanStyleFormat Then
    Console.WriteLine("Text View Generator is ready for this operation.")
End If
```

### Limitations

Runtime only.

Read only.

---

## Nearby

- **Previous:** [TextViewGenerator.CanRedo Property](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol-servervisualization/textviewgenerator/canredo-property/llms-full.txt)
- **Next:** [TextViewGenerator.CanTableFormat Property](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol-servervisualization/textviewgenerator/cantableformat-property/llms-full.txt)
