다음을 통해 공유


TextAlignment Enumeration

Microsoft Silverlight will reach end of support after October 2021. Learn more.

Specifies whether text is centered, left-aligned, or right-aligned.

Namespace:  System.Windows
Assembly:  System.Windows (in System.Windows.dll)

Syntax

'Declaration
Public Enumeration TextAlignment
public enum TextAlignment
<object property="enumMemberName"/>

Members

Member name Description
Supported by Silverlight for Windows Phone Center Text is centered within the container.
Supported by Silverlight for Windows Phone Left Text is aligned to the left edge of the container.
Supported by Silverlight for Windows Phone Right Text is aligned to the right edge of the container.
Supported by Silverlight for Windows Phone Justify Text is justified within the container.

Remarks

Justify is relevant only for certain containers, for example RichTextBox.

Version Notes

Silverlight 3: Justify is not a valid value in Silverlight 3.

Version Information

Silverlight

Supported in: 5, 4, 3

Silverlight for Windows Phone

Supported in: Windows Phone OS 7.1, Windows Phone OS 7.0

Platforms

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.