# 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 RulerBar.Colors.

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

### Syntax

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

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

### Examples

The following example uses `RulerBar.DisplayColors` to configure display colors as part of the ruler bar workflow. The change is then applied to the active document or user interface.

```csharp
rulerBar.DisplayColors = new RulerBar.Colors();
rulerBar.Update();
```

```vbnet
rulerBar.DisplayColors = New RulerBar.Colors()
rulerBar.Update()
```

---

## Nearby

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