TextAlignment Enum
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Specifies whether text is centered, left-aligned, or right-aligned.
public enum class TextAlignment
/// [Windows.Foundation.Metadata.ContractVersion(Microsoft.UI.Xaml.WinUIContract, 65536)]
enum class TextAlignment
[Windows.Foundation.Metadata.ContractVersion(typeof(Microsoft.UI.Xaml.WinUIContract), 65536)]
public enum TextAlignment
Public Enum TextAlignment
<object property="textAlignmentMemberName"/>
- Inheritance
-
TextAlignment
- Attributes
Fields
Center | 0 | Text is centered within the container. |
DetectFromContent | 4 | Text alignment is inferred from the text content. |
End | 2 | The end of the text is aligned to the edge of the container. |
Justify | 3 | Text is justified within the container. |
Left | 1 | Text is aligned to the left edge of the container. |
Right | 2 | Text is aligned to the right edge of the container. |
Start | 1 | The beginning of the text is aligned to the edge of the container. |
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.
Applies to
See also
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for