# RulerBarViewGenerator.Alignment Property

> Gets or sets a value specifying the alignment of the ruler bar in the document. Depending on the alignment either a horizontal or a vertical ruler is displayed.

- **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.Alignment Property
- **392 words**
- **Web URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol-servervisualization/rulerbarviewgenerator/alignment-property/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol-servervisualization/rulerbarviewgenerator/alignment-property/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol-servervisualization/rulerbarviewgenerator/alignment-property/llms-full.txt

---

### Description

Gets or sets a value specifying the alignment of the ruler bar in the document. Depending on the alignment either a horizontal or a vertical ruler is displayed.

### Syntax

```csharp
public RulerBarAlignment Alignment { get; set; }
```

```vbnet
Public Property Alignment As RulerBarAlignment
```

### Members

| Value | Description |
|---|---|
| Left | The ruler bar is displayed with a vertical ruler. |
| Top | The ruler bar is displayed with a horizontal ruler. |

### Examples

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

```csharp
rulerBarViewGenerator.Alignment = RulerBarAlignment.Top;
Console.WriteLine($"Alignment used by Ruler Bar View Generator: {rulerBarViewGenerator.Alignment}");
```

```vbnet
rulerBarViewGenerator.Alignment = RulerBarAlignment.Top
Console.WriteLine($"Alignment used by Ruler Bar View Generator: {rulerBarViewGenerator.Alignment}")
```

---

## Nearby

- **Previous:** [RulerBarViewGenerator Class](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol-servervisualization/rulerbarviewgenerator/llms-full.txt)
- **Next:** [RulerBarViewGenerator.BorderStyle Property](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol-servervisualization/rulerbarviewgenerator/borderstyle-property/llms-full.txt)
