TextAlignment Enumeration
.NET Framework (current version)
Specifies whether the text in the object is left-aligned, right-aligned, centered, or justified.
Assembly: PresentationCore (in PresentationCore.dll)
| Member name | Description | |
|---|---|---|
| Center | Text is centered. | |
| Justify | Text is justified. | |
| Left | Default. Text is aligned to the left. | |
| Right | Text is aligned to the right. |
The enumerated values for the TextAlignment class are Left, Right, Center, and Justify.
In the following example, the TextAlignment property is set to Left.
<FlowDocumentReader> <FlowDocument FontSize="24" LineHeight="48" > <Paragraph TextAlignment="Left" Background="AliceBlue"> One<LineBreak/> two two<LineBreak/> Three Three Three<LineBreak/> four four four four<LineBreak/> Five Five Five Five Five </Paragraph> </FlowDocument> </FlowDocumentReader>
.NET Framework
Available since 3.0
Silverlight
Available since 2.0
Windows Phone Silverlight
Available since 7.0
Available since 3.0
Silverlight
Available since 2.0
Windows Phone Silverlight
Available since 7.0
Show: