Hi all,
This property only affects a control whose template uses the HorizontalContentAlignment property as a parameter. On other controls, this property has no impact. The default is HorizontalAlignment.Center. Therefore, we
need to set it implicitly. For example,
<Button Width="150" Height="30" HorizontalContentAlignment="Stretch" >
<Button.ContentTemplate>
<DataTemplate>
<TextBox Text="50"></TextBox>
</DataTemplate>
</Button.ContentTemplate>
</Button>
Best regards,
Jonathan