# RulerBar.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 WPF.RulerBarColors.

- **Product:** TX Text Control .NET for WPF
- **Section:** Reference
- **Kind:** Property
- **Introduced:** 16.0
- **Namespace:** `TXTextControl.WPF`
- **Package:** `TXTextControl.TextControl.WPF.SDK` (assembly `TXTextControl.WPF.dll`, from the private NuGet feed or Text Control Offline Packages)
- **.NET Framework:** reference `TXTextControl.WPF.dll` from the setup
- **Path:** TX Text Control .NET for WPF > Reference > TXTextControl.WPF > RulerBar.DisplayColors Property
- **447 words**
- **Web URL:** https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-wpf/rulerbar/displaycolors-property/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-wpf/rulerbar/displaycolors-property/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-wpf/rulerbar/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-wpf/reference/txtextcontrol-wpf/rulerbar/borderstyle-property/llms-full.txt) property has been set to `ColorScheme`. The property value is an object of the type WPF.RulerBarColors.

### Syntax

```csharp
public RulerBarColors DisplayColors { get; set; }
```

```vbnet
Public Property DisplayColors As RulerBarColors
```

### Examples

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

```csharp
rulerBar.DisplayColors = new TXTextControl.WPF.RulerBarColors();
if (rulerBar.DisplayColors != null)
{
    Console.WriteLine("Ruler Bar: Display Colors is available.");
}
```

```vbnet
rulerBar.DisplayColors = New TXTextControl.WPF.RulerBarColors()
If rulerBar.DisplayColors IsNot Nothing Then
    Console.WriteLine("Ruler Bar: Display Colors is available.")
End If
```

---

## Nearby

- **Previous:** [RulerBar.Colors.SeparatorColorLight Property](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-wpf/rulerbar-colors/separatorcolorlight-property/llms-full.txt)
- **Next:** [RulerBar.EnablePageMargins Property](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-wpf/rulerbar/enablepagemargins-property/llms-full.txt)
