RichTextBlock.HorizontalTextAlignment Property
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.
Gets or sets a value that indicates how text is aligned in the RichTextBlock.
public:
property TextAlignment HorizontalTextAlignment { TextAlignment get(); void set(TextAlignment value); };
TextAlignment HorizontalTextAlignment();
void HorizontalTextAlignment(TextAlignment value);
public TextAlignment HorizontalTextAlignment { get; set; }
var textAlignment = richTextBlock.horizontalTextAlignment;
richTextBlock.horizontalTextAlignment = textAlignment;
Public Property HorizontalTextAlignment As TextAlignment
<RichTextBlock HorizontalTextAlignment="textAlignmentValue"/>
Property Value
One of the TextAlignment enumeration values that specifies how text is aligned. The default is Left.
Remarks
This property provides the same functionality as the TextAlignment property. If both properties are set to conflicting values, the last one set is used.
Apps that target the Fall Creators Update (SDK 16299) or later should use this property instead of TextAlignment. If your app also supports previous versions, see Version adaptive apps: Use new APIs while maintaining compatibility with previous versions for more info.