Follow these steps to create a base style for a button control and then derive it to create different button styles:
- Open the MainWindow.xaml file and create a <Window.Resources></Window.Resources> section inside the Window tag.
- Now, inside the window resources, add the following style definition, which we discussed in the previous recipe of this chapter:
<Style x:Key="ButtonBaseStyle" TargetType="{x:Type Button}"> <Setter Property="Height" Value="30"/> <Setter Property="MinWidth" Value="180"/> <Setter Property="FontSize" Value="16"/> <Setter Property="HorizontalAlignment" Value="Center"/> <Setter Property="Padding" Value="8 0"/> <Setter Property="Margin" Value="4...