# RulerBar.Colors Class

> The WPF.RulerBarColors class gets, sets or resets the display colors of a WPF.RulerBar control. By default the display colors depend on sytem colors. With this class all colors can be individually designed. The colors are only used when the ruler bar's BorderStyle property has been set to ColorScheme.

- **Product:** TX Text Control .NET for WPF
- **Section:** Reference
- **Kind:** Class
- **Introduced:** 16.0
- **Namespace:** `TXTextControl.WPF`
- **Full name:** `TXTextControl.WPF.RulerBarColors`
- **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
- **Inherits:** `TXTextControl.WPF.ColorBase`
- **Path:** TX Text Control .NET for WPF > Reference > TXTextControl.WPF > RulerBar.Colors Class
- **812 words**
- **Web URL:** https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-wpf/rulerbar-colors/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-wpf/rulerbar-colors/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-wpf/rulerbar-colors/llms-full.txt

---

### Description

The WPF.RulerBarColors class gets, sets or resets the display colors of a [WPF.RulerBar](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-wpf/rulerbar/llms-full.txt) control. By default the display colors depend on sytem colors. With this class all colors can be individually designed. The colors are only used when the ruler bar's [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`.

### Syntax

```csharp
public sealed class RulerBarColors : ColorBase
```

```vbnet
Public NotInheritable Class RulerBarColors
    Inherits ColorBase
```

### Examples

The following example creates a Ruler Bar Colors instance for a document-processing operation. The created object is then available to the surrounding document workflow.

```csharp
TXTextControl.WPF.RulerBarColors rulerBarColors = new();
Console.WriteLine("Ruler Bar Colors is ready for use.");
```

```vbnet
Dim rulerBarColors As New TXTextControl.WPF.RulerBarColors()
Console.WriteLine("Ruler Bar Colors is ready for use.")
```

---

## In This Section

- [RulerBar.Colors.BackColor Property](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-wpf/rulerbar-colors/backcolor-property/llms-full.txt): Gets or sets the background color at the left or top edge of the ruler bar.
- [RulerBar.Colors Constructor](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-wpf/rulerbar-colors/constructor/llms-full.txt): Initializes a new instance of the WPF.RulerBarColors class. After creating the object with this constuctor, individual colors can be set. If the Colors object is assigned to the WPF.RulerBar.DisplayColors property, non-set colors are reset to their system dependent default values.
- [RulerBar.Colors.ForeColor Property](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-wpf/rulerbar-colors/forecolor-property/llms-full.txt): Gets or sets the color used for the numbers of the ruler.
- [RulerBar.Colors.GradientBackColor Property](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-wpf/rulerbar-colors/gradientbackcolor-property/llms-full.txt): Gets or sets the background color at the right or bottom edge of the ruler bar.
- [RulerBar.Colors.RulerColor Property](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-wpf/rulerbar-colors/rulercolor-property/llms-full.txt): Gets or sets the color of the ruler.
- [RulerBar.Colors.SeparatorColorDark Property](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-wpf/rulerbar-colors/separatorcolordark-property/llms-full.txt): Gets or sets the color of dark separators.
- [RulerBar.Colors.SeparatorColorLight Property](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-wpf/rulerbar-colors/separatorcolorlight-property/llms-full.txt): Gets or sets the color of light separators.

---

## Nearby

- **Previous:** [RulerBar.BorderStyle Property](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-wpf/rulerbar/borderstyle-property/llms-full.txt)
- **Next:** [RulerBar.Colors.BackColor Property](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-wpf/rulerbar-colors/backcolor-property/llms-full.txt)
