Skip to content

Latest commit

 

History

History
40 lines (25 loc) · 1.9 KB

control_horizontalcontentalignment.md

File metadata and controls

40 lines (25 loc) · 1.9 KB
-api-id -api-type
P:Windows.UI.Xaml.Controls.Control.HorizontalContentAlignment
winrt property

Windows.UI.Xaml.Controls.Control.HorizontalContentAlignment

-description

Gets or sets the horizontal alignment of the control's content.

-xaml-syntax

<control HorizontalContentAlignment="horizontalAlignmentMemberName"/>

-xaml-values

horizontalAlignmentMemberName
horizontalAlignmentMemberNameA named constant of the HorizontalAlignment enumeration, such as Stretch.

-property-value

One of the HorizontalAlignment values. The default is Center.

-remarks

Each control might apply this property differently based on the Style setters for the control's implicit style, and its visual template. Also, the apparent "default value" of each individual control used in UI can be different.

A value for the HorizontalContentAlignment property only affects layout behavior for a control when its template uses the HorizontalContentAlignment property as the source of a HorizontalAlignment value for presenters or content areas within. On other controls, setting HorizontalContentAlignment has no effect. For more info about visual templates for controls, see the reference for Control.Template and Control templates

-examples

-see-also

VerticalContentAlignment, FrameworkElement.HorizontalAlignment, Alignment, margin, and padding, Control templates