<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                    xmlns:local="clr-namespace:SourceChord.FluentWPF">

    <local:RelativePositionConverter x:Key="relativePositionConverter" />

    <Style x:Key="ButtonRevealStyle"
           TargetType="{x:Type Button}">

        <!--提示文字的延遲-->
        <Setter Property="ToolTipService.InitialShowDelay"
                Value="1000" />
        
        <Setter Property="Focusable"
                Value="False" />
        
        <Setter Property="OverridesDefaultStyle"
                Value="True" />
        <Setter Property="BorderBrush"
                Value="#30FFFFFF" />

        <Setter Property="Foreground"
                Value="#FFFFFFFF" />
        <Setter Property="Background"
                Value="#00000000" />
        <Setter Property="BorderThickness"
                Value="1" />
        <Setter Property="HorizontalContentAlignment"
                Value="Center" />
        <Setter Property="VerticalContentAlignment"
                Value="Center" />
        <Setter Property="SnapsToDevicePixels"
                Value="True" />
        <Setter Property="UseLayoutRounding"
                Value="True" />

        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type Button}">
                    <Grid x:Name="root"
                          Background="{TemplateBinding Background}">
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup x:Name="CommonStates">
                                <VisualState x:Name="Normal">
                                    <Storyboard>
                                        <DoubleAnimation Storyboard.TargetProperty="(UIElement.Opacity)"
                                                         Storyboard.TargetName="backgroundBorder"
                                                         To="0"
                                                         Duration="0:0:0.1600">
                                            <DoubleAnimation.EasingFunction>
                                                <CubicEase EasingMode="EaseOut" />
                                            </DoubleAnimation.EasingFunction>
                                        </DoubleAnimation>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="MouseOver">
                                    <Storyboard>
                                        <DoubleAnimation Storyboard.TargetProperty="(UIElement.Opacity)"
                                                         Storyboard.TargetName="backgroundBorder"
                                                         To="0.5"
                                                         Duration="0:0:0.1600">
                                            <DoubleAnimation.EasingFunction>
                                                <CubicEase EasingMode="EaseOut" />
                                            </DoubleAnimation.EasingFunction>
                                        </DoubleAnimation>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Pressed">
                                    <Storyboard>
                                        <DoubleAnimation Storyboard.TargetProperty="(UIElement.Opacity)"
                                                         Storyboard.TargetName="backgroundBorder"
                                                         To="0.5"
                                                         Duration="0:0:0.1600">
                                            <DoubleAnimation.EasingFunction>
                                                <CubicEase EasingMode="EaseOut" />
                                            </DoubleAnimation.EasingFunction>
                                        </DoubleAnimation>

                                        <DoubleAnimation Storyboard.TargetProperty="(UIElement.Opacity)"
                                                         Storyboard.TargetName="hoverLight"
                                                         To="0"
                                                         Duration="0:0:0.100">
                                            <DoubleAnimation.EasingFunction>
                                                <CubicEase EasingMode="EaseOut" />
                                            </DoubleAnimation.EasingFunction>
                                        </DoubleAnimation>

                                        <DoubleAnimation Storyboard.TargetProperty="(UIElement.Opacity)"
                                                         Storyboard.TargetName="pressLight"
                                                         To="1"
                                                         Duration="0:0:0.100">
                                            <DoubleAnimation.EasingFunction>
                                                <CubicEase EasingMode="EaseOut" />
                                            </DoubleAnimation.EasingFunction>
                                        </DoubleAnimation>

                                        <DoubleAnimation Storyboard.TargetProperty="(RadialGradientBrush.RadiusX)"
                                                         Storyboard.TargetName="brush"
                                                         From="100"
                                                         To="50"
                                                         Duration="0:0:0.300">
                                            <DoubleAnimation.EasingFunction>
                                                <CubicEase EasingMode="EaseOut" />
                                            </DoubleAnimation.EasingFunction>
                                        </DoubleAnimation>
                                        <DoubleAnimation Storyboard.TargetProperty="(RadialGradientBrush.RadiusX)"
                                                         Storyboard.TargetName="brush"
                                                         To="500"
                                                         BeginTime="0:0:0.500"
                                                         Duration="0:0:4.000">
                                            <DoubleAnimation.EasingFunction>
                                                <SineEase EasingMode="EaseInOut" />
                                            </DoubleAnimation.EasingFunction>
                                        </DoubleAnimation>
                                        <DoubleAnimation Storyboard.TargetProperty="(RadialGradientBrush.RadiusY)"
                                                         Storyboard.TargetName="brush"
                                                         From="100"
                                                         To="50"
                                                         Duration="0:0:0.300">
                                            <DoubleAnimation.EasingFunction>
                                                <CubicEase EasingMode="EaseOut" />
                                            </DoubleAnimation.EasingFunction>
                                        </DoubleAnimation>
                                        <DoubleAnimation Storyboard.TargetProperty="(RadialGradientBrush.RadiusY)"
                                                         Storyboard.TargetName="brush"
                                                         To="500"
                                                         BeginTime="0:0:0.500"
                                                         Duration="0:0:4.000">
                                            <DoubleAnimation.EasingFunction>
                                                <SineEase EasingMode="EaseInOut" />
                                            </DoubleAnimation.EasingFunction>
                                        </DoubleAnimation>

                                        <DoubleAnimation Storyboard.TargetProperty="Opacity"
                                                         Storyboard.TargetName="brush"
                                                         To="0"
                                                         BeginTime="0:0:0.500"
                                                         Duration="0:0:4.000">
                                            <DoubleAnimation.EasingFunction>
                                                <SineEase EasingMode="EaseInOut" />
                                            </DoubleAnimation.EasingFunction>
                                        </DoubleAnimation>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Disabled" />
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>
                        <Border x:Name="backgroundBorder"
                                Opacity="0">
                            <Grid ClipToBounds="True">
                                <Border x:Name="hoverLight"
                                        Background="{local:RevealBrush Color=White, Size = 200,Opacity=0.6}" />
                                <Rectangle x:Name="pressLight"
                                           Opacity="0">
                                    <Rectangle.Fill>
                                        <RadialGradientBrush x:Name="brush"
                                                             MappingMode="Absolute"
                                                             RadiusY="5"
                                                             RadiusX="5">
                                            <RadialGradientBrush.Center>
                                                <MultiBinding Converter="{StaticResource relativePositionConverter}">
                                                    <Binding ElementName="pressLight"
                                                             Path="(local:PointerTracker.RootObject)" />
                                                    <Binding RelativeSource="{RelativeSource FindAncestor, AncestorType={x:Type Rectangle}}" />
                                                    <Binding ElementName="pressLight"
                                                             Path="(local:PointerTracker.Position)" />
                                                </MultiBinding>
                                            </RadialGradientBrush.Center>
                                            <RadialGradientBrush.GradientOrigin>
                                                <MultiBinding Converter="{StaticResource relativePositionConverter}">
                                                    <Binding ElementName="pressLight"
                                                             Path="(local:PointerTracker.RootObject)" />
                                                    <Binding RelativeSource="{RelativeSource FindAncestor, AncestorType={x:Type Rectangle}}" />
                                                    <Binding ElementName="pressLight"
                                                             Path="(local:PointerTracker.Position)" />
                                                </MultiBinding>
                                            </RadialGradientBrush.GradientOrigin>
                                            <GradientStop Color="Transparent"
                                                          Offset="0" />
                                            <GradientStop Color="#88FFFFFF"
                                                          Offset="0.5" />
                                            <GradientStop Color="Transparent"
                                                          Offset="1" />
                                        </RadialGradientBrush>
                                    </Rectangle.Fill>
                                </Rectangle>
                            </Grid>
                        </Border>

                        <!-- Content -->
                        <Border BorderBrush="{x:Null}"
                                BorderThickness="{TemplateBinding BorderThickness}">
                            <ContentPresenter x:Name="contentPresenter"
                                              Focusable="False"
                                              HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                                              VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                                              Margin="{TemplateBinding Padding}"
                                              RecognizesAccessKey="True"
                                              SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
                        </Border>

                        <!-- MouseOver border -->
                        <Border BorderBrush="{local:RevealBrush Color=White,Size=50,Opacity=0.3}"
                                BorderThickness="{TemplateBinding BorderThickness}">
                        </Border>
                    </Grid>

                    <ControlTemplate.Triggers>
                        <Trigger Property="IsMouseOver"
                                 Value="True">
                            <Setter TargetName="root"
                                    Property="Background"
                                    Value="#BB808080" />
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>



    <!--小按鈕 - 光圈半徑40 -->
    <Style x:Key="ButtonAccentRevealStyle"
           TargetType="{x:Type Button}"
           BasedOn="{StaticResource ButtonRevealStyle}">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type Button}">

                    <Grid x:Name="root"
                          Background="{TemplateBinding Background}">


                        <Grid.Triggers>
                            <EventTrigger RoutedEvent="Mouse.MouseDown">
                                <BeginStoryboard>
                                    <Storyboard>


                                        <!--邊框閃爍-->
                                        <DoubleAnimation Storyboard.TargetProperty="(UIElement.Opacity)"
                                                         Storyboard.TargetName="hoverLight"
                                                         To="0.6"
                                                         Duration="0:0:0.2">
                                            <DoubleAnimation.EasingFunction>
                                                <CubicEase EasingMode="EaseOut" />
                                            </DoubleAnimation.EasingFunction>
                                        </DoubleAnimation>

                                        <DoubleAnimation Storyboard.TargetProperty="(UIElement.Opacity)"
                                                         Storyboard.TargetName="hoverLight"
                                                         To="1"
                                                         BeginTime="0:0:0.2"
                                                         Duration="0:0:0.2">
                                            <DoubleAnimation.EasingFunction>
                                                <CubicEase EasingMode="EaseOut" />
                                            </DoubleAnimation.EasingFunction>
                                        </DoubleAnimation>


                                        <!--收縮-->
                                        <!--<DoubleAnimation Storyboard.TargetProperty="(RadialGradientBrush.RadiusX)"
                                                         Storyboard.TargetName="brush"
                                                         From="80"
                                                         To="15"
                                                         Duration="0:0:0.3">
                                            <DoubleAnimation.EasingFunction>
                                                <CubicEase EasingMode="EaseOut" />
                                            </DoubleAnimation.EasingFunction>
                                        </DoubleAnimation>
                                        <DoubleAnimation Storyboard.TargetProperty="(RadialGradientBrush.RadiusY)"
                                                         Storyboard.TargetName="brush"
                                                         From="80"
                                                         To="15"
                                                         Duration="0:0:0.3">
                                            <DoubleAnimation.EasingFunction>
                                                <CubicEase EasingMode="EaseOut" />
                                            </DoubleAnimation.EasingFunction>
                                        </DoubleAnimation>-->

                                        <!--釋放-->
                                        <DoubleAnimation Storyboard.TargetProperty="(RadialGradientBrush.RadiusX)"
                                                         Storyboard.TargetName="brush"
                                                         From="15"
                                                         To="80"
                                                         BeginTime="0:0:0.0"
                                                         Duration="0:0:0.3">
                                            <DoubleAnimation.EasingFunction>
                                                <CubicEase EasingMode="EaseOut" />
                                            </DoubleAnimation.EasingFunction>
                                        </DoubleAnimation>

                                        <DoubleAnimation Storyboard.TargetProperty="(RadialGradientBrush.RadiusY)"
                                                         Storyboard.TargetName="brush"
                                                         From="15"
                                                         To="80"
                                                         BeginTime="0:0:0.0"
                                                         Duration="0:0:0.3">
                                            <DoubleAnimation.EasingFunction>
                                                <CubicEase EasingMode="EaseOut" />
                                            </DoubleAnimation.EasingFunction>
                                        </DoubleAnimation>

                                        <DoubleAnimation Storyboard.TargetProperty="Opacity"
                                                         Storyboard.TargetName="brush"
                                                         From="1"
                                                         To="0"
                                                         Duration="0:0:0.3">
                                            <DoubleAnimation.EasingFunction>
                                                <SineEase EasingMode="EaseInOut" />
                                            </DoubleAnimation.EasingFunction>
                                        </DoubleAnimation>



                                    </Storyboard>
                                </BeginStoryboard>
                            </EventTrigger>
                        </Grid.Triggers>


                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup x:Name="CommonStates">

                                <!--原始狀態-->
                                <VisualState x:Name="Normal">
                                    <Storyboard>

                                        <DoubleAnimation Storyboard.TargetProperty="(UIElement.Opacity)"
                                                         Storyboard.TargetName="hoverLight"
                                                         To="0"
                                                         Duration="0:0:0">
                                        </DoubleAnimation>
                                        
                                        <!--高光邊框-->
                                        <DoubleAnimation Storyboard.TargetProperty="(UIElement.Opacity)"
                                                         Storyboard.TargetName="border_高光邊框"
                                                         To="0.4"
                                                         Duration="0:0:0">
                                        </DoubleAnimation>

                                    </Storyboard>
                                </VisualState>

                                <!--滑鼠移入-->
                                <VisualState x:Name="MouseOver">

                                    <Storyboard>
                                        
                                        <!--高光邊框-->
                                        <DoubleAnimation Storyboard.TargetProperty="(UIElement.Opacity)"
                                                         Storyboard.TargetName="border_高光邊框"
                                                         To="1"
                                                         Duration="0:0:0">
                                        </DoubleAnimation>
                                        
                                        <!--背景顏色-->
                                        <DoubleAnimation Storyboard.TargetProperty="(UIElement.Opacity)"
                                                         Storyboard.TargetName="hoverLight_bac"
                                                         To="1"
                                                         Duration="0:0:0">
                                        </DoubleAnimation>

                                        <!--跟隨滑鼠的光圈-->
                                        <DoubleAnimation Storyboard.TargetProperty="(UIElement.Opacity)"
                                                         Storyboard.TargetName="hoverLight"
                                                         To="1"
                                                         Duration="0:0:0">
                                        </DoubleAnimation>


                                    </Storyboard>
                                </VisualState>



                                <!--按下-->
                                <VisualState x:Name="Pressed">
                                    <Storyboard>

                                        <!--背景顏色-->
                                        <DoubleAnimation Storyboard.TargetProperty="(UIElement.Opacity)"
                                                         Storyboard.TargetName="hoverLight_bac"
                                                         To="1"
                                                         Duration="0:0:0">
                                        </DoubleAnimation>

                                    </Storyboard>
                                </VisualState>


                                <VisualState x:Name="Disabled" />
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>

                        <Border x:Name="backgroundBorder">

                            <Grid ClipToBounds="True">
                                
                                <!--滑鼠移入時的背景顏色 -->
                                <Border x:Name="hoverLight_bac"
                                           Opacity="0"
                                           Background="#20FFFFFF"
                                           BorderBrush="{TemplateBinding BorderBrush}"
                                           BorderThickness="{TemplateBinding BorderThickness}"></Border>
                                
                                
                                <!--跟隨滑鼠移動的光圈-->
                                <Border x:Name="hoverLight"
                                        Background="{local:RevealBrush Color=#20FFFFFF, Size = 50,Opacity=1}"                             
                                        Panel.ZIndex="2" />

                                


                                <Rectangle x:Name="pressLight"
                                           Opacity="1">
                                    <Rectangle.Fill>
                                        <RadialGradientBrush x:Name="brush"
                                                             MappingMode="Absolute"
                                                             RadiusY="0"
                                                             RadiusX="0">

                                            <RadialGradientBrush.Center>
                                                <MultiBinding Converter="{StaticResource relativePositionConverter}">
                                                    <Binding ElementName="pressLight"
                                                             Path="(local:PointerTracker.RootObject)" />
                                                    <Binding RelativeSource="{RelativeSource FindAncestor, AncestorType={x:Type Rectangle}}" />
                                                    <Binding ElementName="pressLight"
                                                             Path="(local:PointerTracker.Position)" />
                                                </MultiBinding>
                                            </RadialGradientBrush.Center>

                                            <RadialGradientBrush.GradientOrigin>
                                                <MultiBinding Converter="{StaticResource relativePositionConverter}">
                                                    <Binding ElementName="pressLight"
                                                             Path="(local:PointerTracker.RootObject)" />
                                                    <Binding RelativeSource="{RelativeSource FindAncestor, AncestorType={x:Type Rectangle}}" />
                                                    <Binding ElementName="pressLight"
                                                             Path="(local:PointerTracker.Position)" />
                                                </MultiBinding>
                                            </RadialGradientBrush.GradientOrigin>

                                            <GradientStop Color="Transparent"
                                                          Offset="0" />
                                            <GradientStop Color="#50FFFFFF"
                                                          Offset="0.5" />
                                            <GradientStop Color="Transparent"
                                                          Offset="1" />
                                        </RadialGradientBrush>
                                    </Rectangle.Fill>
                                </Rectangle>
                            </Grid>
                        </Border>

                        <!-- Content -->
                        <Border BorderBrush="{x:Null}">
                            <ContentPresenter x:Name="contentPresenter"
                                              Focusable="False"
                                              HorizontalAlignment="Stretch"
                                              VerticalAlignment="Stretch"
                                              Margin="{TemplateBinding Padding}"
                                              RecognizesAccessKey="True"
                                              SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
                        </Border>

                        <!-- MouseOver border -->
                        <Border x:Name="border_高光邊框" BorderBrush="{local:RevealBrush Color=White,Size=40,Opacity=0.4}"
                                BorderThickness="{TemplateBinding BorderThickness}"
                                Grid.ZIndex="3"  >
                        </Border>
                    </Grid>

                    <!--<ControlTemplate.Triggers>
                        <Trigger Property="IsMouseOver" Value="True">
                            <Setter TargetName="root" Property="Background" Value="{x:Static local:AccentColors.ImmersiveSystemAccentBrush}"/>
                        </Trigger>
                    </ControlTemplate.Triggers>-->
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    
    <!--大按鈕 - 光圈半徑80 -->
    <Style x:Key="ButtonAccentRevealStyle_80"
           TargetType="{x:Type Button}"
           BasedOn="{StaticResource ButtonRevealStyle}">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type Button}">

                    <Grid x:Name="root"
                          Background="{TemplateBinding Background}">


                        <Grid.Triggers>
                            <EventTrigger RoutedEvent="Mouse.MouseDown">
                                <BeginStoryboard>
                                    <Storyboard>


                                        <!--邊框閃爍-->
                                        <DoubleAnimation Storyboard.TargetProperty="(UIElement.Opacity)"
                                                         Storyboard.TargetName="hoverLight"
                                                         To="0.6"
                                                         Duration="0:0:0.2">
                                            <DoubleAnimation.EasingFunction>
                                                <CubicEase EasingMode="EaseOut" />
                                            </DoubleAnimation.EasingFunction>
                                        </DoubleAnimation>

                                        <DoubleAnimation Storyboard.TargetProperty="(UIElement.Opacity)"
                                                         Storyboard.TargetName="hoverLight"
                                                         To="1"
                                                         BeginTime="0:0:0.2"
                                                         Duration="0:0:0.2">
                                            <DoubleAnimation.EasingFunction>
                                                <CubicEase EasingMode="EaseOut" />
                                            </DoubleAnimation.EasingFunction>
                                        </DoubleAnimation>


                                        <!--收縮-->
                                        <!--<DoubleAnimation Storyboard.TargetProperty="(RadialGradientBrush.RadiusX)"
                                                         Storyboard.TargetName="brush"
                                                         From="100"
                                                         To="20"
                                                         Duration="0:0:0.3">
                                            <DoubleAnimation.EasingFunction>
                                                <CubicEase EasingMode="EaseOut" />
                                            </DoubleAnimation.EasingFunction>
                                        </DoubleAnimation>
                                        <DoubleAnimation Storyboard.TargetProperty="(RadialGradientBrush.RadiusY)"
                                                         Storyboard.TargetName="brush"
                                                         From="100"
                                                         To="20"
                                                         Duration="0:0:0.3">
                                            <DoubleAnimation.EasingFunction>
                                                <CubicEase EasingMode="EaseOut" />
                                            </DoubleAnimation.EasingFunction>
                                        </DoubleAnimation>-->

                                        <!--釋放-->
                                        <DoubleAnimation Storyboard.TargetProperty="(RadialGradientBrush.RadiusX)"
                                                         Storyboard.TargetName="brush"
                                                         From="20"
                                                         To="100"
                                                         BeginTime="0:0:0.0"
                                                         Duration="0:0:0.3">
                                            <DoubleAnimation.EasingFunction>
                                                <CubicEase EasingMode="EaseOut" />
                                            </DoubleAnimation.EasingFunction>
                                        </DoubleAnimation>

                                        <DoubleAnimation Storyboard.TargetProperty="(RadialGradientBrush.RadiusY)"
                                                         Storyboard.TargetName="brush"
                                                         From="20"
                                                         To="100"
                                                         BeginTime="0:0:0.0"
                                                         Duration="0:0:0.3">
                                            <DoubleAnimation.EasingFunction>
                                                <CubicEase EasingMode="EaseOut" />
                                            </DoubleAnimation.EasingFunction>
                                        </DoubleAnimation>

                                        <DoubleAnimation Storyboard.TargetProperty="Opacity"
                                                         Storyboard.TargetName="brush"
                                                         From="1"
                                                         To="0"
                                                         Duration="0:0:0.3">
                                            <DoubleAnimation.EasingFunction>
                                                <SineEase EasingMode="EaseInOut" />
                                            </DoubleAnimation.EasingFunction>
                                        </DoubleAnimation>



                                    </Storyboard>
                                </BeginStoryboard>
                            </EventTrigger>
                        </Grid.Triggers>


                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup x:Name="CommonStates">

                                <!--原始狀態-->
                                <VisualState x:Name="Normal">
                                    <Storyboard>

                                        <DoubleAnimation Storyboard.TargetProperty="(UIElement.Opacity)"
                                                         Storyboard.TargetName="hoverLight"
                                                         To="0"
                                                         Duration="0:0:0">
                                        </DoubleAnimation>
                                        
                                        <!--高光邊框-->
                                        <DoubleAnimation Storyboard.TargetProperty="(UIElement.Opacity)"
                                                         Storyboard.TargetName="border_高光邊框"
                                                         To="0.4"
                                                         Duration="0:0:0">
                                        </DoubleAnimation>

                                    </Storyboard>
                                </VisualState>

                                <!--滑鼠移入-->
                                <VisualState x:Name="MouseOver">

                                    <Storyboard>
                                        
                                        <!--高光邊框-->
                                        <DoubleAnimation Storyboard.TargetProperty="(UIElement.Opacity)"
                                                         Storyboard.TargetName="border_高光邊框"
                                                         To="1"
                                                         Duration="0:0:0">
                                        </DoubleAnimation>
                                        
                                        <!--背景顏色-->
                                        <DoubleAnimation Storyboard.TargetProperty="(UIElement.Opacity)"
                                                         Storyboard.TargetName="hoverLight_bac"
                                                         To="1"
                                                         Duration="0:0:0">
                                        </DoubleAnimation>

                                        <!--跟隨滑鼠的光圈-->
                                        <DoubleAnimation Storyboard.TargetProperty="(UIElement.Opacity)"
                                                         Storyboard.TargetName="hoverLight"
                                                         To="1"
                                                         Duration="0:0:0">
                                        </DoubleAnimation>


                                    </Storyboard>
                                </VisualState>



                                <!--按下-->
                                <VisualState x:Name="Pressed">
                                    <Storyboard>

                                        <!--背景顏色-->
                                        <DoubleAnimation Storyboard.TargetProperty="(UIElement.Opacity)"
                                                         Storyboard.TargetName="hoverLight_bac"
                                                         To="1"
                                                         Duration="0:0:0">
                                        </DoubleAnimation>

                                    </Storyboard>
                                </VisualState>


                                <VisualState x:Name="Disabled" />
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>

                        <Border x:Name="backgroundBorder">

                            <Grid ClipToBounds="True">

                                <!--滑鼠移入時的背景顏色 -->
                                <Border x:Name="hoverLight_bac"
                                        Opacity="0"
                                        Background="#20FFFFFF"
                                        BorderBrush="{TemplateBinding BorderBrush}"
                                        BorderThickness="{TemplateBinding BorderThickness}"></Border>


                                <!--跟隨滑鼠移動的光圈-->
                                <Border x:Name="hoverLight"
                                        Background="{local:RevealBrush Color=#20FFFFFF, Size = 100,Opacity=1}"
                                        Panel.ZIndex="2" />




                                <Rectangle x:Name="pressLight"
                                           Opacity="1">
                                    <Rectangle.Fill>
                                        <RadialGradientBrush x:Name="brush"
                                                             MappingMode="Absolute"
                                                             RadiusY="0"
                                                             RadiusX="0">

                                            <RadialGradientBrush.Center>
                                                <MultiBinding Converter="{StaticResource relativePositionConverter}">
                                                    <Binding ElementName="pressLight"
                                                             Path="(local:PointerTracker.RootObject)" />
                                                    <Binding RelativeSource="{RelativeSource FindAncestor, AncestorType={x:Type Rectangle}}" />
                                                    <Binding ElementName="pressLight"
                                                             Path="(local:PointerTracker.Position)" />
                                                </MultiBinding>
                                            </RadialGradientBrush.Center>

                                            <RadialGradientBrush.GradientOrigin>
                                                <MultiBinding Converter="{StaticResource relativePositionConverter}">
                                                    <Binding ElementName="pressLight"
                                                             Path="(local:PointerTracker.RootObject)" />
                                                    <Binding RelativeSource="{RelativeSource FindAncestor, AncestorType={x:Type Rectangle}}" />
                                                    <Binding ElementName="pressLight"
                                                             Path="(local:PointerTracker.Position)" />
                                                </MultiBinding>
                                            </RadialGradientBrush.GradientOrigin>

                                            <GradientStop Color="Transparent"
                                                          Offset="0" />
                                            <GradientStop Color="#50FFFFFF"
                                                          Offset="0.5" />
                                            <GradientStop Color="Transparent"
                                                          Offset="1" />
                                        </RadialGradientBrush>
                                    </Rectangle.Fill>
                                </Rectangle>
                            </Grid>
                        </Border>

                        <!-- Content -->
                        <Border BorderBrush="{x:Null}">
                            <ContentPresenter x:Name="contentPresenter"
                                              Focusable="False"
                                              HorizontalAlignment="Stretch"
                                              VerticalAlignment="Stretch"
                                              Margin="{TemplateBinding Padding}"
                                              RecognizesAccessKey="True"
                                              SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
                        </Border>

                        <!-- MouseOver border -->
                        <Border x:Name="border_高光邊框" BorderBrush="{local:RevealBrush Color=White,Size=50,Opacity=0.4}"
                                BorderThickness="{TemplateBinding BorderThickness}"
                                Grid.ZIndex="3">
                        </Border>
                    </Grid>

                    <!--<ControlTemplate.Triggers>
                        <Trigger Property="IsMouseOver" Value="True">
                            <Setter TargetName="root" Property="Background" Value="{x:Static local:AccentColors.ImmersiveSystemAccentBrush}"/>
                        </Trigger>
                    </ControlTemplate.Triggers>-->
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>




    <!--大按鈕 - 光圈半徑80 -->
    <Style x:Key="ButtonAccentRevealStyle_底下換頁按鈕"
           TargetType="{x:Type Button}"
           BasedOn="{StaticResource ButtonRevealStyle}">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type Button}">

                    <Grid x:Name="root"
                          Background="{TemplateBinding Background}">


                        <Grid.Triggers>
                            <EventTrigger RoutedEvent="Mouse.MouseDown">
                                <BeginStoryboard>
                                    <Storyboard>


                          


                                        <!--收縮-->
                                        <!--<DoubleAnimation Storyboard.TargetProperty="(RadialGradientBrush.RadiusX)"
                                                         Storyboard.TargetName="brush"
                                                         From="100"
                                                         To="20"
                                                         Duration="0:0:0.3">
                                            <DoubleAnimation.EasingFunction>
                                                <CubicEase EasingMode="EaseOut" />
                                            </DoubleAnimation.EasingFunction>
                                        </DoubleAnimation>
                                        <DoubleAnimation Storyboard.TargetProperty="(RadialGradientBrush.RadiusY)"
                                                         Storyboard.TargetName="brush"
                                                         From="100"
                                                         To="20"
                                                         Duration="0:0:0.3">
                                            <DoubleAnimation.EasingFunction>
                                                <CubicEase EasingMode="EaseOut" />
                                            </DoubleAnimation.EasingFunction>
                                        </DoubleAnimation>-->

                                        <!--釋放-->
                                        <DoubleAnimation Storyboard.TargetProperty="(RadialGradientBrush.RadiusX)"
                                                         Storyboard.TargetName="brush"
                                                         From="20"
                                                         To="100"
                                                         BeginTime="0:0:0.0"
                                                         Duration="0:0:0.3">
                                            <DoubleAnimation.EasingFunction>
                                                <CubicEase EasingMode="EaseOut" />
                                            </DoubleAnimation.EasingFunction>
                                        </DoubleAnimation>

                                        <DoubleAnimation Storyboard.TargetProperty="(RadialGradientBrush.RadiusY)"
                                                         Storyboard.TargetName="brush"
                                                         From="20"
                                                         To="100"
                                                         BeginTime="0:0:0.0"
                                                         Duration="0:0:0.3">
                                            <DoubleAnimation.EasingFunction>
                                                <CubicEase EasingMode="EaseOut" />
                                            </DoubleAnimation.EasingFunction>
                                        </DoubleAnimation>

                                        <DoubleAnimation Storyboard.TargetProperty="Opacity"
                                                         Storyboard.TargetName="brush"
                                                         From="1"
                                                         To="0"
                                                         Duration="0:0:0.3">
                                            <DoubleAnimation.EasingFunction>
                                                <SineEase EasingMode="EaseInOut" />
                                            </DoubleAnimation.EasingFunction>
                                        </DoubleAnimation>



                                    </Storyboard>
                                </BeginStoryboard>
                            </EventTrigger>
                        </Grid.Triggers>


                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup x:Name="CommonStates">

                                <!--原始狀態-->
                                <VisualState x:Name="Normal">
                                    <Storyboard>

                                        <!--<DoubleAnimation Storyboard.TargetProperty="(UIElement.Opacity)"
                                                         Storyboard.TargetName="hoverLight"
                                                         To="0"
                                                         Duration="0:0:0">
                                        </DoubleAnimation>-->


                                    </Storyboard>
                                </VisualState>

                                <!--滑鼠移入-->
                                <VisualState x:Name="MouseOver">

                                    <Storyboard>

                                        <!--背景顏色-->
                                        <!--<DoubleAnimation Storyboard.TargetProperty="(UIElement.Opacity)"
                                                         Storyboard.TargetName="hoverLight_bac"
                                                         To="1"
                                                         Duration="0:0:0">
                                        </DoubleAnimation>

                                        --><!--跟隨滑鼠的光圈--><!--
                                        <DoubleAnimation Storyboard.TargetProperty="(UIElement.Opacity)"
                                                         Storyboard.TargetName="hoverLight"
                                                         To="1"
                                                         Duration="0:0:0">
                                        </DoubleAnimation>-->


                                    </Storyboard>
                                </VisualState>



                                <!--按下-->
                                <VisualState x:Name="Pressed">
                                    <Storyboard>

                                        <!--背景顏色-->
                                        <!--<DoubleAnimation Storyboard.TargetProperty="(UIElement.Opacity)"
                                                         Storyboard.TargetName="hoverLight_bac"
                                                         To="1"
                                                         Duration="0:0:0">
                                        </DoubleAnimation>-->

                                    </Storyboard>
                                </VisualState>


                                <VisualState x:Name="Disabled" />
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>

                        <Border x:Name="backgroundBorder">

                            <Grid ClipToBounds="True">

                                <!--滑鼠移入時的背景顏色 -->
                                <!--<Border x:Name="hoverLight_bac"
                                        Opacity="0"
                                        Background="#00FFFFFF"
                                        BorderBrush="{TemplateBinding BorderBrush}"
                                        BorderThickness="{TemplateBinding BorderThickness}"></Border>-->


                                <!--跟隨滑鼠移動的光圈-->
                                <!--<Border x:Name="hoverLight"
                                        Background="{local:RevealBrush Color=#20FFFFFF, Size = 0,Opacity=1}"
                                        Panel.ZIndex="2" />-->




                                <Rectangle x:Name="pressLight"
                                           Opacity="1">
                                    <Rectangle.Fill>
                                        <RadialGradientBrush x:Name="brush"
                                                             MappingMode="Absolute"
                                                             RadiusY="0"
                                                             RadiusX="0">

                                            <RadialGradientBrush.Center>
                                                <MultiBinding Converter="{StaticResource relativePositionConverter}">
                                                    <Binding ElementName="pressLight"
                                                             Path="(local:PointerTracker.RootObject)" />
                                                    <Binding RelativeSource="{RelativeSource FindAncestor, AncestorType={x:Type Rectangle}}" />
                                                    <Binding ElementName="pressLight"
                                                             Path="(local:PointerTracker.Position)" />
                                                </MultiBinding>
                                            </RadialGradientBrush.Center>

                                            <RadialGradientBrush.GradientOrigin>
                                                <MultiBinding Converter="{StaticResource relativePositionConverter}">
                                                    <Binding ElementName="pressLight"
                                                             Path="(local:PointerTracker.RootObject)" />
                                                    <Binding RelativeSource="{RelativeSource FindAncestor, AncestorType={x:Type Rectangle}}" />
                                                    <Binding ElementName="pressLight"
                                                             Path="(local:PointerTracker.Position)" />
                                                </MultiBinding>
                                            </RadialGradientBrush.GradientOrigin>

                                            <GradientStop Color="Transparent"
                                                          Offset="0" />
                                            <GradientStop Color="#20FFFFFF"
                                                          Offset="0.5" />
                                            <GradientStop Color="Transparent"
                                                          Offset="1" />
                                        </RadialGradientBrush>
                                    </Rectangle.Fill>
                                </Rectangle>
                            </Grid>
                        </Border>

                        <!-- Content -->
                        <Border BorderBrush="{x:Null}">
                            <ContentPresenter x:Name="contentPresenter"
                                              Focusable="False"
                                              HorizontalAlignment="Stretch"
                                              VerticalAlignment="Stretch"
                                              Margin="{TemplateBinding Padding}"
                                              RecognizesAccessKey="True"
                                              SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
                        </Border>

                        <!-- MouseOver border -->
                        <!--<Border BorderBrush="{local:RevealBrush Color=White,Size=50,Opacity=0.8}"
                                BorderThickness="{TemplateBinding BorderThickness}"
                                Grid.ZIndex="3">
                        </Border>-->
                    </Grid>

                    <!--<ControlTemplate.Triggers>
                        <Trigger Property="IsMouseOver" Value="True">
                            <Setter TargetName="root" Property="Background" Value="{x:Static local:AccentColors.ImmersiveSystemAccentBrush}"/>
                        </Trigger>
                    </ControlTemplate.Triggers>-->
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>




</ResourceDictionary>