Control.HorizontalContentAlignment Property
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Gets or sets the horizontal alignment of the control's content.
public:
property HorizontalAlignment HorizontalContentAlignment { HorizontalAlignment get(); void set(HorizontalAlignment value); };
HorizontalAlignment HorizontalContentAlignment();
void HorizontalContentAlignment(HorizontalAlignment value);
public HorizontalAlignment HorizontalContentAlignment { get; set; }
var horizontalAlignment = control.horizontalContentAlignment;
control.horizontalContentAlignment = horizontalAlignment;
Public Property HorizontalContentAlignment As HorizontalAlignment
<control HorizontalContentAlignment="horizontalAlignmentMemberName"/>
One of the HorizontalAlignment values. The default is Center
.
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
Product | Versions |
---|---|
WinRT | Build 10240, Build 10586, Build 14383, Build 15063, Build 16299, Build 17134, Build 17763, Build 18362, Build 19041, Build 20348, Build 22000, Build 22621, Build 26100 |