Content Alignment
In addition to HorizontalAlignment
and VerticalAlignment
properties, the Control
class also has HorizontalContentAlignment
and VerticalContentAlignment
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
. This wasn’t the case for the previous Button
s; however, Button
overrides these settings. ...
Get XAML 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.