<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                     xmlns:md="http://materialdesigninxaml.net/winfx/xaml/themes"
                    xmlns:assist="clr-namespace:SmartUI.Assist">
    <Style TargetType="{x:Type RadioButton}">
        <Setter Property="Background" Value="Transparent"/>
        <Setter Property="Foreground" Value="{DynamicResource PrimaryTextColor}"/>
        <Setter Property="FontSize" Value="16"></Setter>
        <Setter Property="MinHeight" Value="30"/>
        <Setter Property="VerticalContentAlignment" Value="Center" />
        <Setter Property="BorderThickness" Value="1"/>
        <Setter Property="Cursor" Value="Hand"/>
        <Setter Property="Margin" Value="5 0"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type RadioButton}">
                    <Grid x:Name="templateRoot" Background="Transparent" SnapsToDevicePixels="True" Margin="0 0 5 0">
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="Auto"/>
                            <ColumnDefinition Width="*"/>
                        </Grid.ColumnDefinitions>
                        <Border x:Name="radioButtonBorder" BorderBrush="{TemplateBinding BorderBrush}" Height="15" Width="15" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" CornerRadius="7" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="1,1,5,1" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
                        <ContentPresenter x:Name="contentPresenter" Grid.Column="1" Focusable="False" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" RecognizesAccessKey="True" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
                    </Grid>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsMouseOver" Value="true">
                            <Setter Property="BorderBrush" Value="#FF1890FF"/>
                        </Trigger>
                        <Trigger Property="IsEnabled" Value="False">
                            <Setter Property="Opacity" TargetName="templateRoot" Value="0.4"/>
                            <Setter Property="Background" TargetName="templateRoot" Value="#FFFFFF"/>
                            <Setter Property="Cursor"  TargetName="templateRoot" Value="No"/>
                            <Setter Property="IsHitTestVisible" Value="False"/>
                            <!--<Setter Property="Fill" TargetName="optionMark" Value="Gray"/>-->
                        </Trigger>
                        <Trigger Property="IsPressed" Value="true">
                            <Setter Property="Background"  Value="#FFD9ECFF"/>
                            <Setter Property="BorderBrush" Value="{DynamicResource BrandColor}"/>
                            <!--<Setter Property="Fill" TargetName="optionMark" Value="#FF212121"/>-->
                        </Trigger>
                        <Trigger Property="IsChecked" Value="true">
                            <Setter Property="BorderThickness"  Value="3"/>
                            <Setter Property="BorderBrush" Value="{DynamicResource BrandColor}"/>
                            <!--<Setter Property="Opacity" TargetName="optionMark" Value="1"/>-->
                        </Trigger>
                        <Trigger Property="IsChecked" Value="{x:Null}">
                            <!--<Setter Property="Opacity" TargetName="optionMark" Value="0.56"/>-->
                        </Trigger>
                        <EventTrigger RoutedEvent="Checked">
                            <EventTrigger.Actions>
                                <BeginStoryboard>
                                    <Storyboard>
                                        <ThicknessAnimation Storyboard.TargetProperty="BorderThickness" Duration="0:0:0.15" AutoReverse="False" FillBehavior="Stop" From="7" To="4"/>
                                    </Storyboard>
                                </BeginStoryboard>
                            </EventTrigger.Actions>
                        </EventTrigger>
                        <EventTrigger RoutedEvent="Unchecked">
                            <EventTrigger.Actions>
                                <BeginStoryboard>
                                    <Storyboard>
                                        <ThicknessAnimation Storyboard.TargetProperty="BorderThickness" Duration="0:0:0.15" AutoReverse="False" FillBehavior="Stop" From="4" To="7"/>
                                    </Storyboard>
                                </BeginStoryboard>
                            </EventTrigger.Actions>
                        </EventTrigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>


    <Style x:Key="RadioButtonGroupStyle" TargetType="{x:Type RadioButton}">
        <Setter Property="MinWidth" Value="60"/>
        <Setter Property="Height" Value="40"/>
        <Setter Property="VerticalAlignment" Value="Center"/>
        <Setter Property="Padding" Value="10,5"/>
        <Setter Property="BorderBrush" Value="{DynamicResource BorderLightColor}"/>
        <Setter Property="assist:ButtonAssist.IsDynamicCornerRadius" Value="True"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="RadioButton">
                    <Border x:Name="border" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="0 1 1 1" CornerRadius="0" Background="{TemplateBinding Background}">
                        <Label HorizontalContentAlignment="Center" Content="{TemplateBinding Content}" HorizontalAlignment="Center" VerticalAlignment="Center" Padding="{TemplateBinding Padding}" Foreground="{TemplateBinding Foreground}"/>
                    </Border>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsMouseOver" Value="True">
                            <Setter Property="Foreground" Value="{DynamicResource BrandColor}"/>
                        </Trigger>
                        <Trigger Property="IsChecked" Value="True">
                            <Setter Property="Background" Value="{DynamicResource BrandColor}"/>
                            <Setter Property="Foreground" Value="White"/>
                            <Setter Property="BorderBrush" Value="{DynamicResource BrandColor}"/>
                        </Trigger>
                        <Trigger Property="IsEnabled" Value="False">
                            <Setter TargetName="border" Property="Opacity" Value="0.7"/>
                            <Setter TargetName="border" Property="Cursor" Value="No"/>
                            <Setter Property="Foreground" Value="{DynamicResource RegularTextColor}"/>
                        </Trigger>
                        <EventTrigger RoutedEvent="Checked">
                            <EventTrigger.Actions>
                                <BeginStoryboard>
                                    <Storyboard>
                                        <ColorAnimation Storyboard.TargetName="border" Storyboard.TargetProperty="(Background).(SolidColorBrush.Color)" Duration="00:00:.3" To="Red"/>
                                    </Storyboard>
                                </BeginStoryboard>
                            </EventTrigger.Actions>
                        </EventTrigger>
                        <EventTrigger RoutedEvent="Unchecked">
                            <EventTrigger.Actions>
                                <BeginStoryboard>
                                    <Storyboard>
                                        <ColorAnimation Storyboard.TargetName="border" Storyboard.TargetProperty="(Background).(SolidColorBrush.Color)" Duration="00:00:.3" To="White"/>
                                    </Storyboard>
                                </BeginStoryboard>
                            </EventTrigger.Actions>
                        </EventTrigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style x:Key="BottomLineRadioButton" TargetType="{x:Type RadioButton}">
        <Setter Property="Background" Value="Transparent"></Setter>
        <Setter Property="Padding" Value="3 2 3 2"></Setter>
        <Setter Property="FontSize" Value="16"></Setter>
        <Setter Property="Height" Value="auto"></Setter>
        <Setter Property="MinWidth" Value="60"/>
       
        <!--<Setter Property="Foreground" Value="White"/>-->
        <Setter Property="SnapsToDevicePixels" Value="true"></Setter>
        <Setter Property="Cursor" Value="Hand"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type RadioButton}">
                    <Grid x:Name="grid" VerticalAlignment="Center">
                        <Grid.RowDefinitions>
                            <RowDefinition Height="*"/>
                            <RowDefinition Height="8"/>
                        </Grid.RowDefinitions>
                       
                        <ContentPresenter VerticalAlignment="Center" HorizontalAlignment="Center" Margin="{TemplateBinding Padding}" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
                        
                    </Grid>
                    <!--触发器：设置选中状态符号-->
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsChecked" Value="true">
                            <Setter Property="Background" Value="Red"/>
                            <Setter Property="Foreground" Value="Red"/>
                        </Trigger>
                        <Trigger Property="IsMouseOver" Value="true">

                        </Trigger>
                        <Trigger Property="IsEnabled" Value="False">

                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
</ResourceDictionary>