<Window x:Class="_5_WPF样式和行为_5多层样式.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"
        mc:Ignorable="d"
        Icon="public/003540AH4M72.jpg" Title="_5_WPF样式和行为_5多层样式" Height="450" Width="800">
    <Window.Resources>
        <Style x:Key="BigFontButtonStyle">
            <Setter Property="Control.FontFamily" Value="Time New Roman" />
            <Setter Property="Control.FontSize" Value="18" />
            <Setter Property="Control.FontWeight" Value="Bold" />
        </Style>

        <!-- BasedOn 如果设置了两次相同的属性 最后一个会覆盖前面那个 -->
        <Style x:Key="EmphasizeBigFontButtonStyle" BasedOn="{StaticResource BigFontButtonStyle}">
            <Setter Property="Control.Foreground" Value="White" />
            <Setter Property="Control.Background" Value="DarkBlue" />
        </Style>
    </Window.Resources>
    <StackPanel>
        <Button Margin="10 " Padding="15 5" Style="{StaticResource EmphasizeBigFontButtonStyle}">第一个</Button>
    </StackPanel>
</Window>