# RulerBar.Colors Constructor

> 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.

- **Product:** TX Text Control .NET for WPF
- **Section:** Reference
- **Kind:** Constructor
- **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
- **Path:** TX Text Control .NET for WPF > Reference > TXTextControl.WPF > RulerBar.Colors Constructor
- **350 words**
- **Web URL:** https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-wpf/rulerbar-colors/constructor/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-wpf/rulerbar-colors/constructor/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-wpf/rulerbar-colors/constructor/llms-full.txt

---

### Description

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](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-wpf/rulerbar/displaycolors-property/llms-full.txt) property, non-set colors are reset to their system dependent default values.

### Syntax

```csharp
public RulerBarColors();
```

```vbnet
Public Sub New()
```

### 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.")
```

---

## Nearby

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