# RulerBarViewGenerator.ReadOnly Property

> Gets or sets a value determining the ruler bar's read only mode. When the ruler bar is set to read only, it still shows all formatting attributes of the connected TextControl, but formatting attributes cannot be changed.

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

---

### Description

Gets or sets a value determining the ruler bar's read only mode. When the ruler bar is set to read only, it still shows all formatting attributes of the connected TextControl, but formatting attributes cannot be changed.

### Syntax

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

```vbnet
Public Property [ReadOnly] As Boolean
```

### Examples

The following example uses `RulerBarViewGenerator.ReadOnly` to prevent users from editing through the ruler bar view generator. The configured value is checked before the workflow continues.

```csharp
rulerBarViewGenerator.ReadOnly = true;
if (rulerBarViewGenerator.ReadOnly)
{
    Console.WriteLine("Ruler Bar View Generator: Read Only is enabled.");
}
```

```vbnet
rulerBarViewGenerator.ReadOnly = True
If rulerBarViewGenerator.ReadOnly Then
    Console.WriteLine("Ruler Bar View Generator: Read Only is enabled.")
End If
```

---

## Nearby

- **Previous:** [RulerBarViewGenerator.Location Property](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol-servervisualization/rulerbarviewgenerator/location-property/llms-full.txt)
- **Next:** [RulerBarViewGenerator.ResetDisplayColors Method](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol-servervisualization/rulerbarviewgenerator/resetdisplaycolors-method/llms-full.txt)
