TextAlignment Enum
Definition
Defines how text is aligned.
public enum TextAlignment
Fields
| Name | Description |
|---|---|
| Center | The text is centered. |
| DetectFromContent | Text alignment is inferred from the text content. |
| End | The end of the text is aligned to the edge of the available space. |
| Justify | Text is justified within the available space. |
| Left | The text is left-aligned. |
| Right | The text is right-aligned. |
| Start | The beginning of the text is aligned to the edge of the available space. |
Center Field
The text is centered.
public Avalonia.Media.TextAlignment Center
DetectFromContent Field
Text alignment is inferred from the text content.
public Avalonia.Media.TextAlignment DetectFromContent
Remarks
When the TextAlignment property is set to DetectFromContent, alignment is inferred from the text content of the control. For example, English text is left aligned, and Arabic text is right aligned.
End Field
The end of the text is aligned to the edge of the available space.
public Avalonia.Media.TextAlignment End
Justify Field
Text is justified within the available space.
public Avalonia.Media.TextAlignment Justify
Left Field
The text is left-aligned.
public Avalonia.Media.TextAlignment Left
Right Field
The text is right-aligned.
public Avalonia.Media.TextAlignment Right
Start Field
The beginning of the text is aligned to the edge of the available space.
public Avalonia.Media.TextAlignment Start