<Window x:Class="BasedOn_Sample.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
        xmlns:local="clr-namespace:BasedOn_Sample"
        mc:Ignorable="d"
      Title="BasedOnStyle" Height="170" Width="400">
    <Window.Resources>
        <Style TargetType="ButtonBase">
            <Setter Property="Height" Value="25" />
            <Setter Property="FontSize" Value="14" />
            <Setter Property="Margin" Value="6" />
            <Setter Property="Foreground" Value="White" />
            <Setter Property="Background">
                <Setter.Value>
                    <LinearGradientBrush>
                        <GradientStop Offset="0.0" Color="#101010" />
                        <GradientStop Offset="1.0" Color="#AAAAAA" />
                    </LinearGradientBrush>
                </Setter.Value>
            </Setter>
        </Style>

        <Style TargetType="ToggleButton" BasedOn="{StaticResource {x:Type ButtonBase}}">
            <Setter Property="FontWeight" Value="Bold" />
        </Style>

        <Style TargetType="Button" BasedOn="{StaticResource {x:Type ButtonBase}}">
            <Setter Property="FontFamily" Value="Courier New" />
            <Setter Property="Margin" Value="4" />
        </Style>

    </Window.Resources>
    <StackPanel>
        <Button>Button1</Button>
        <ToggleButton>ToggleButton 1</ToggleButton>
        <Button>Button2</Button>
    </StackPanel>
</Window>

