<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                    xmlns:iconPacks="http://metro.mahapps.com/winfx/xaml/iconpacks">
    <ResourceDictionary.MergedDictionaries>
        <ResourceDictionary Source="pack://application:,,,/FLY.ControlLibrary;component/Themes/BaseStyle.xaml"/>
        <ResourceDictionary Source="pack://application:,,,/FLY.ControlLibrary;component/Themes/ButtonStyle.xaml"/>
    </ResourceDictionary.MergedDictionaries>
    
    <!--这个文件的生成方式只能选 Page， 不用选resource 不然会提示
    无法从 iconPacks:PackIconMaterial 生成 TargetType -->
    
    
    <!--标准图标按钮 内部为iconPacks的按键，下方可带文字 -->
    <Style TargetType="Button" x:Key="ButtonStyle_icon" BasedOn="{StaticResource ButtonStyle_empty}">
        <Style.Resources>
            <Style TargetType="TextBlock" >
                <Setter Property="FontSize" Value="12"/>
                <Setter Property="Foreground" Value="Black"/>
                <Setter Property="HorizontalAlignment" Value="Center"/>
                <Setter Property="TextAlignment" Value="Center"/>
                <Setter Property="FontFamily" Value="YouYuan"/>
                <Setter Property="Margin" Value="3"/>
            </Style>
            <Style TargetType="iconPacks:PackIconMaterial" >
                <Setter Property="Width" Value="36"/>
                <Setter Property="Height" Value="auto"/>
                <Setter Property="HorizontalAlignment" Value="Center"/>
            </Style>
            
        </Style.Resources>
        <Style.Setters>
            <Setter Property="Foreground" Value="{StaticResource Color_theme_activity}"/>
            <Setter Property="Margin" Value="{StaticResource ControlMargin}"/>
            <Setter Property="VerticalAlignment" Value="Center"/>
            <Setter Property="HorizontalAlignment" Value="Center"/>
        </Style.Setters>
    </Style>
    <!--小型图标按钮 内部为iconPacks的按键，下方不带文字 -->
    <Style TargetType="Button" x:Key="ButtonStyle_smallIcon" BasedOn="{StaticResource ButtonStyle_empty}">
        <Style.Resources>
            <Style TargetType="iconPacks:PackIconMaterial" >
                <Setter Property="Width" Value="25"/>
                <Setter Property="Height" Value="auto"/>
                <Setter Property="HorizontalAlignment" Value="Center"/>
            </Style>
        </Style.Resources>
        <Style.Setters>
            <Setter Property="Foreground" Value="{StaticResource Color_theme_activity}"/>
            <Setter Property="Margin" Value="{StaticResource ControlMargin}"/>
            <Setter Property="VerticalAlignment" Value="Center"/>
            <Setter Property="HorizontalAlignment" Value="Center"/>
        </Style.Setters>
    </Style>
    <!--大型图标按钮 内部为iconPacks的按键，下方可带文字 -->
    <Style TargetType="Button" x:Key="ButtonStyle_largeIcon" BasedOn="{StaticResource ButtonStyle_empty}">
        <Style.Resources>
            <Style TargetType="TextBlock" >
                <Setter Property="FontSize" Value="18"/>
                <Setter Property="Foreground" Value="Black"/>
                <Setter Property="HorizontalAlignment" Value="Center"/>
            </Style>
            <Style TargetType="iconPacks:PackIconMaterial" >
                <Setter Property="Width" Value="50"/>
                <Setter Property="Height" Value="auto"/>
                <Setter Property="HorizontalAlignment" Value="Center"/>
            </Style>
        </Style.Resources>
        <Style.Setters>
            <Setter Property="Foreground" Value="{StaticResource Color_theme_activity}"/>
            <Setter Property="Margin" Value="{StaticResource ControlMargin}"/>
            <Setter Property="VerticalAlignment" Value="Center"/>
            <Setter Property="HorizontalAlignment" Value="Center"/>
        </Style.Setters>
    </Style>


    <!--圆形确定按钮，绿色， 很多界面使用，例如扫描图 设置界面 -->
    <Style x:Key="ButtonStyle_apply" TargetType="Button" BasedOn="{StaticResource ButtonStyle_empty}">
        <Setter Property="Foreground" Value="#FF31AE15"/>
        <Setter Property="Margin" Value="{StaticResource ControlMargin}"/>
        <Setter Property="HorizontalAlignment" Value="Right"/>
        <Setter Property="VerticalAlignment" Value="Top"/>
        <Setter Property="Content">
            <Setter.Value>
                <Grid>
                    <Ellipse Fill="White" Height="90" Width="90"/>
                    <iconPacks:PackIconMaterial Kind="CheckCircle" HorizontalAlignment="Center" VerticalAlignment="Center" Width="80" Height="auto" />
                </Grid>
            </Setter.Value>
        </Setter>
    </Style>

    <!--矩形图标按钮 内部为iconPacks的按键，下方不可带文字 -->
    <Style TargetType="Button" x:Key="ButtonStyle_RectangleIcon">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type Button}">
                    <Grid Style="{StaticResource GridStyle_ButtonShadow}">
                        <Border 
                                        BorderBrush="{TemplateBinding BorderBrush}" 
                                        BorderThickness="{TemplateBinding BorderThickness}" 
                                        Background="{TemplateBinding Background}" 
                                        Height="40" 
                                        Width="40"
                                        >
                            <ContentPresenter RecognizesAccessKey="True" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
                        </Border>
                    </Grid>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsKeyboardFocused" Value="true">
                        </Trigger>
                        <Trigger Property="IsEnabled" Value="false">
                        </Trigger>
                        <Trigger Property="IsPressed" Value="true">
                            <Setter Property="Opacity" Value="0.5"/>
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
        <Setter Property="Background" Value="{StaticResource Color_theme_activity}"/>
        <Setter Property="Foreground" Value="{StaticResource Color_theme_background}"/>
        <Setter Property="BorderBrush" Value="Transparent"/>
        <Setter Property="Margin" Value="{StaticResource ControlMargin}"/>
        <Style.Resources>
            <Style TargetType="iconPacks:PackIconMaterial" >
                <Setter Property="Width" Value="20"/>
                <Setter Property="Height" Value="auto"/>
                <Setter Property="VerticalAlignment" Value="Center"/>
                <Setter Property="HorizontalAlignment" Value="Center"/>
            </Style>
        </Style.Resources>
    </Style>
</ResourceDictionary>