<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">

    <Style x:Key="FunctionRadio" TargetType="RadioButton">
        <Setter Property="Foreground" Value="Black"/>
        <Setter Property="BorderThickness" Value="0"/>
        <Setter Property="Background" Value="Transparent"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="RadioButton">
                    <Border x:Name="border" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" SnapsToDevicePixels="True" CornerRadius="4">
                        <ContentPresenter x:Name="Cont" Content="{TemplateBinding Content}" ContentTemplate="{TemplateBinding ContentTemplate}" VerticalAlignment="Center" HorizontalAlignment="Center" Margin="8,4"/>
                    </Border>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsMouseOver" Value="True">
                            <Setter TargetName="border" Property="Background" Value="#e4e8ec"/>
                        </Trigger>
                        <Trigger Property="IsPressed" Value="True">
                            <Setter TargetName="border" Property="Background" Value="#e4e8ec"/>
                        </Trigger>
                        <Trigger Property="IsChecked" Value="True">
                            <Setter TargetName="border" Property="Background" Value="{StaticResource SubThemeColor}"/>
                            <Setter TargetName="Cont" Property="TextElement.Foreground" Value="White"/>
                        </Trigger>
                        <Trigger Property="IsChecked" Value="False">
                            <Setter TargetName="Cont" Property="TextElement.Foreground" Value="Black"/>
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style x:Key="RadioButtonStyle" TargetType="RadioButton">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="RadioButton">
                    <Grid >
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="auto"/>
                            <ColumnDefinition Width="8"/>
                            <ColumnDefinition Width="auto"/>
                        </Grid.ColumnDefinitions>
                        <Border x:Name="border"  BorderBrush="DarkGray" BorderThickness="1" Width="14" Height="14" CornerRadius="14" Margin="0,1,0,0">
                            <Border x:Name="Inner" Width="6" Height="6" CornerRadius="10" VerticalAlignment="Center" HorizontalAlignment="Center" Background="{TemplateBinding Background}"/>

                        </Border>

                        <ContentPresenter Grid.Column="2" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                                      VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                                      Margin="{TemplateBinding Padding}"/>
                    </Grid>
                    <ControlTemplate.Triggers>

                        <Trigger Property="IsChecked" Value="True">
                            <Setter TargetName="Inner" Property="Background" Value="Red" />
                            <Setter TargetName="border" Property="BorderBrush" Value="Red" />

                        </Trigger>

                        <MultiTrigger>
                            <MultiTrigger.Conditions>
                                <Condition Property="IsMouseOver" Value="True"/>
                                <Condition Property="IsChecked" Value="False"/>
                            </MultiTrigger.Conditions>
                            <Setter TargetName="border" Property="BorderBrush" Value="#525b6d" />
                        </MultiTrigger>

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

    <Style x:Key="RadioVertical" TargetType="RadioButton">
        <Setter Property="Margin" Value="1"/>
        <Setter Property="Background" Value="Transparent"/>
        <Setter Property="HorizontalContentAlignment" Value="Left"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="RadioButton">
                    <Border x:Name="Show" Background="{TemplateBinding Background}"  Margin="{TemplateBinding Margin}" CornerRadius="2">
                        <ContentPresenter Panel.ZIndex="0" VerticalAlignment="Center" HorizontalAlignment="Left"/>
                    </Border>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsMouseOver" Value="True">
                            <Setter Property="Background" Value="{StaticResource ThemeColor}"/>
                        </Trigger>
                        <Trigger Property="IsChecked" Value="True">
                            <Setter Property="Background" Value="{StaticResource NiceBlue}"/>
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style x:Key="RadioThemeColor" TargetType="RadioButton">
        <Setter Property="Background" Value="{StaticResource ThemeColor}"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="RadioButton">
                    <Grid Background="{TemplateBinding Background}" Margin="{TemplateBinding Margin}">
                        <ContentPresenter Panel.ZIndex="0" VerticalAlignment="Center" HorizontalAlignment="Center" Margin="8" TextElement.Foreground="{StaticResource TextColor}"/>
                        <Border x:Name="_borderOver" Background="Transparent" BorderBrush="Transparent" BorderThickness="1" Margin="1">

                        </Border>
                        <Border x:Name="_borderChecked" Visibility="Collapsed" Background="{StaticResource NiceGreen}" HorizontalAlignment="Right" VerticalAlignment="Bottom" Width="12" Height="12">
                            <Path Data="M2,7 5,10 11,2" Margin="0 0 0 0" VerticalAlignment="Center" HorizontalAlignment="Center" Stroke="White" StrokeThickness="2"/>
                        </Border>
                    </Grid>
                    <ControlTemplate.Triggers>
                        <Trigger Property="HasContent" Value="True">
                            <Setter Property="FocusVisualStyle">
                                <Setter.Value>
                                    <Style>
                                        <Setter Property="Control.Template">
                                            <Setter.Value>
                                                <ControlTemplate>
                                                    <Rectangle Margin="14,0,0,0" SnapsToDevicePixels="True" Stroke="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" StrokeThickness="1" StrokeDashArray="1 2"/>
                                                </ControlTemplate>
                                            </Setter.Value>
                                        </Setter>
                                    </Style>
                                </Setter.Value>
                            </Setter>

                        </Trigger>
                        <Trigger Property="IsMouseOver" Value="True">
                            <Setter Property="BorderBrush" TargetName="_borderOver" Value="White"/>
                        </Trigger>
                        <Trigger Property="IsChecked" Value="True">
                            <Setter Property="Visibility" TargetName="_borderChecked" Value="Visible"/>
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style x:Key="FunctionRadioButton" TargetType="RadioButton">
        <Setter Property="Background" Value="{StaticResource ThemeColor}"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="RadioButton">
                    <Grid Background="{TemplateBinding Background}" Margin="{TemplateBinding Margin}">
                        <Grid>

                            <ContentPresenter x:Name="contetn" Grid.Row="0" VerticalAlignment="Center" HorizontalAlignment="Center" Margin="8" TextElement.Foreground="{StaticResource TextColor}"/>

                            <Border Grid.Row="1" x:Name="_borderChecked" Visibility="Collapsed" VerticalAlignment="Bottom" Margin="0,0,0,4" CornerRadius="1" Background="{StaticResource  TextColor}" Width="50" Height="2"/>
                        </Grid>

                    </Grid>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsMouseOver" Value="True">
                            <Setter Property="Background" Value="{StaticResource SubThemeColor}"/>
                        </Trigger>
                        <Trigger Property="IsPressed" Value="True">
                            <Setter Property="Background" Value="{StaticResource SubThemeColor}"/>
                        </Trigger>
                        <Trigger Property="IsChecked" Value="True">
                            <Setter TargetName="_borderChecked" Property="Visibility" Value="Visible"/>
                        </Trigger>
                        <Trigger Property="IsChecked" Value="False">
                            <Setter TargetName="_borderChecked" Property="Visibility" Value="Collapsed"/>
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style x:Key="ThemeRadioButton" TargetType="RadioButton">
        <Setter Property="Background" Value="{StaticResource ThemeColor}"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="RadioButton">
                    <Grid Background="{TemplateBinding Background}" Margin="{TemplateBinding Margin}">
                        <Grid>

                            <ContentPresenter x:Name="contetn" Grid.Row="0" VerticalAlignment="Center" HorizontalAlignment="Center" Margin="8" TextElement.Foreground="{StaticResource TextColor}"/>

                            <Border Grid.Row="1" x:Name="_borderChecked" Visibility="Collapsed" VerticalAlignment="Bottom" Margin="0,0,0,4" CornerRadius="1" Background="{StaticResource  TextColor}" Width="50" Height="2"/>
                        </Grid>

                    </Grid>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsMouseOver" Value="True">
                            <Setter Property="Background" Value="{StaticResource SubThemeColor}"/>
                        </Trigger>
                        <Trigger Property="IsPressed" Value="True">
                            <Setter Property="Background" Value="{StaticResource SubThemeColor}"/>
                        </Trigger>
                        <Trigger Property="IsChecked" Value="True">
                            <Setter Property="Background" Value="{StaticResource ThemeColor}"/>

                        </Trigger>
                        <Trigger Property="IsChecked" Value="False">
                            <Setter Property="Background" Value="{StaticResource DisableColor}"/>

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