Expand Minimize

HorizontalAlignment Enumeration

July 28, 2014

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.

public enum 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:
© 2014 Microsoft