I have been trying various techniques to try and get the button label text center aligned. When I look at the button in the Avalonia DevTools inpspector, I can see the the AccessText TextAlignment is always set to Left.
Here is one attempt at applying a style, but is doesn't work:
<Style Selector="Button">
<Setter Property="Background" Value="Black"/>
<Setter Property="Foreground" Value="Gray"/>
<Setter Property="FontWeight" Value="Bold" />
<Setter Property="HorizontalAlignment" Value="Center" />
<Setter Property="TextBlock.TextAlignment" Value="Center"/>
</Style>
What is the proper way to modify the TextBlock TextAlignment?
