HorizontalAlignment Enumeration
TOC
Collapse the table of content
Expand the table of content

HorizontalAlignment Enumeration

[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]

Indicates where an element should be displayed on the horizontal axis relative to the allocated layout slot of the parent element.

Namespace:  System.Windows
Assembly:  System.Windows (in System.Windows.dll)
XMLNS for XAML: Not mapped to an xmlns.

'Declaration
Public Enumeration HorizontalAlignment
<object property="enumMemberName"/>

Member nameDescription
LeftAn element aligned to the left of the layout slot for the parent element.
CenterAn element aligned to the center of the layout slot for the parent element.
RightAn element aligned to the right of the layout slot for the parent element.
StretchAn element stretched to fill the entire layout slot of the parent element.

Stretch is the default layout behavior.

Element Height and Width properties that are explicitly set take precedence over the Stretch property value.

Windows Phone OS

Supported in: 8.1, 8.0, 7.1, 7.0

Windows Phone

Show:
© 2017 Microsoft