# HorizontalAlignment Enumeration

> Determines values for the horizontal alignment of the text or of text frames, images and charts. The enumeration contains the following values:

- **Product:** TX Text Control .NET for WPF
- **Section:** Reference
- **Kind:** Enumeration
- **Namespace:** `TXTextControl`
- **Package:** `TXTextControl.TextControl.WPF.SDK` (assembly `TXTextControl.dll`, from the private NuGet feed or Text Control Offline Packages)
- **.NET Framework:** reference `TXTextControl.dll` from the setup
- **Path:** TX Text Control .NET for WPF > Reference > TXTextControl > HorizontalAlignment Enumeration
- **603 words**
- **Web URL:** https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/horizontalalignment/enumeration/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/horizontalalignment/enumeration/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/horizontalalignment/enumeration/llms-full.txt

---

### Description

Determines values for the horizontal alignment of the text or of text frames, images and charts. The enumeration contains the following values:

### Syntax

```csharp
public enum HorizontalAlignment
```

```vbnet
Public Enum HorizontalAlignment
```

### Members

| Member | Value | Description |
|---|---|---|
| Left | 1 | The alignment is left aligned. |
| Right | 2 | The alignment right aligned. |
| Center | 3 | The alignment is centered. |
| Justify | 4 | The alignment is justified. This value is only used with text. It cannot be used with text frames, images and charts. |

### Examples

The following example selects the Center value from the Horizontal Alignment enumeration and uses it as a documented workflow choice.

```csharp
TXTextControl.HorizontalAlignment value = TXTextControl.HorizontalAlignment.Center;
Console.WriteLine($"Using Horizontal Alignment: {value}");
```

```vbnet
Dim value As TXTextControl.HorizontalAlignment = TXTextControl.HorizontalAlignment.Center
Console.WriteLine($"Using Horizontal Alignment: {value}")
```

### See Also

[ParagraphFormat.Alignment](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/paragraphformat/alignment-property/llms-full.txt) Property, [FrameBase.Alignment](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/framebase/alignment-property/llms-full.txt) Property, [ChartCollection.Add](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-datavisualization/chartcollection/add-method/llms-full.txt) Method, [ImageCollection.Add](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/imagecollection/add-method/llms-full.txt) Method, [TextFrameCollection.Add](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/textframecollection/add-method/llms-full.txt) Method.

---

## Nearby

- **Previous:** [HeaderFooterType Enumeration](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/headerfootertype/enumeration/llms-full.txt)
- **Next:** [HypertextLink Class](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/hypertextlink/llms-full.txt)
