Content Alignment
In addition to HorizontalAlignment
and VerticalAlignment
properties, the Control
class also has Horizontal
ContentAlignment
and Vertical
ContentAlignment
properties. These properties determine how a control’s content fills the space within the control. (Therefore, the relationship between alignment and content alignment is somewhat like the relationship between Margin
and Padding
.)
The content alignment properties are of the same enumeration types as the corresponding alignment properties, so they provide the same options. However, the default value for HorizontalContentAlignment
is Left
, and the default value for VerticalContentAlignment
is Top
. Some elements implicitly choose different defaults. Button
s, for example, center ...
Get Universal Windows® Apps with XAML and C# Unleashed now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.