HorizontalAlignment Enumeration
- Namespace
TXTextControl
- Package
TXTextControl.from the private NuGet feed or Text Control Offline PackagesTextControl. WPF. SDK
- Assembly
TXTextControl.dll
- Install
dotnet add package TXTextControl..NET 8 and later. For .NET Framework, referenceTextControl. WPF. SDK TXTextControl.from the setup.dll
Description
Determines values for the horizontal alignment of the text or of text frames, images and charts. The enumeration contains the following values:
Syntax
public enum HorizontalAlignmentPublic Enum HorizontalAlignmentMembers
| 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.
TXTextControl.HorizontalAlignment value = TXTextControl.HorizontalAlignment.Center;
Console.WriteLine($"Using Horizontal Alignment: {value}");Dim value As TXTextControl.HorizontalAlignment = TXTextControl.HorizontalAlignment.Center
Console.WriteLine($"Using Horizontal Alignment: {value}")See Also
ParagraphFormat.Alignment Property, FrameBase.Alignment Property, ChartCollection.Add Method, ImageCollection.Add Method, TextFrameCollection.Add Method.