Tried using a Label as well.
The text in the button is being left aligned.
<ItemsControl ItemsSource="{Binding ButtonLinks}">
<ItemsControl.ItemTemplate>
<DataTemplate>
<RadioButton Style="{StaticResource {x:Type ToggleButton}}"
Margin="5"
Background="{x:Null}"
Height="40"
FontSize="14"
GroupName="Views"
FontWeight="Normal"
cal:Message.Attach="ShowPage">
<TextBlock Text="{Binding BtnText}"
TextAlignment="Center"
HorizontalAlignment="Center"
VerticalAlignment="Center"/>
</RadioButton>
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>
ETA:
I’m using MahApps.Metro overlay and when I remove the controls resource in the App.xaml it works, basically is there a way to override a property like alignment on a resource you pull in?
The line I remove from app.xaml:
<ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Controls.xaml" />
I had to override HorizontalAlignment for a RadioButton which was being set to “Left” in the mahapps library.