HorizontalAlignment Enumeration
Microsoft Silverlight will reach end of support after October 2021. Learn more.
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)
Syntax
'Declaration
Public Enumeration HorizontalAlignment
public enum HorizontalAlignment
<object property="enumMemberName"/>
Members
Member name | Description | |
---|---|---|
Left | An element aligned to the left of the layout slot for the parent element. | |
Center | An element aligned to the center of the layout slot for the parent element. | |
Right | An element aligned to the right of the layout slot for the parent element. | |
Stretch | An element stretched to fill the entire layout slot of the parent element. |
Remarks
Stretch is the default layout behavior.
Element Height and Width properties that are explicitly set take precedence over the Stretch property value.
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.