# RulerBarViewGenerator.DisplayColors Property

> Gets or sets the colors of the ruler bar. These colors are only used when the BorderStyle property has been set to ColorScheme. The property value is an object of the type ServerVisualization.RulerBarViewGenerator.Colors.

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

---

### Description

Gets or sets the colors of the ruler bar. These colors are only used when the [BorderStyle](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol-servervisualization/rulerbarviewgenerator/borderstyle-property/llms-full.txt) property has been set to `ColorScheme`. The property value is an object of the type [ServerVisualization.RulerBarViewGenerator.Colors](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol-servervisualization/rulerbarviewgenerator-colors/llms-full.txt).

### Syntax

```csharp
public RulerBarViewGenerator.Colors DisplayColors { get; set; }
```

```vbnet
Public Property DisplayColors As RulerBarViewGenerator.Colors
```

### Examples

The following example uses `RulerBarViewGenerator.DisplayColors` to configure display colors as part of the ruler bar view generator workflow. The configured value is checked before the workflow continues.

```csharp
rulerBarViewGenerator.DisplayColors = new TXTextControl.ServerVisualisation.RulerBarViewGenerator.Colors();
if (rulerBarViewGenerator.DisplayColors != null)
{
    Console.WriteLine("Ruler Bar View Generator: Display Colors is available.");
}
```

```vbnet
rulerBarViewGenerator.DisplayColors = New TXTextControl.ServerVisualisation.RulerBarViewGenerator.Colors()
If rulerBarViewGenerator.DisplayColors IsNot Nothing Then
    Console.WriteLine("Ruler Bar View Generator: Display Colors is available.")
End If
```

---

## Nearby

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