<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                    xmlns:controls="clr-namespace:ClassIsland.Controls;assembly=ClassIsland"
                    xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
                    xmlns:ci="http://classisland.tech/schemas/xaml/core"
                    xmlns:system="clr-namespace:System;assembly=mscorlib"
                    xmlns:classIsland="clr-namespace:ClassIsland;assembly=ClassIsland">
    <Storyboard x:Key="OverlayMaskIn">
        <DoubleAnimationUsingKeyFrames Storyboard.TargetName="OverlayMask" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)">
            <EasingDoubleKeyFrame KeyTime="00:00:00.0" Value="0.2"/>
            <EasingDoubleKeyFrame KeyTime="00:00:00.750" Value="1">
                <EasingDoubleKeyFrame.EasingFunction>
                    <CircleEase EasingMode="EaseOut"/>
                </EasingDoubleKeyFrame.EasingFunction>
            </EasingDoubleKeyFrame>
        </DoubleAnimationUsingKeyFrames>
        <DoubleAnimationUsingKeyFrames Storyboard.TargetName="OverlayMask" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)">
            <EasingDoubleKeyFrame KeyTime="00:00:00.0" Value="0.2"/>
            <EasingDoubleKeyFrame KeyTime="00:00:00.750" Value="1">
                <EasingDoubleKeyFrame.EasingFunction>
                    <CircleEase EasingMode="EaseOut"/>
                </EasingDoubleKeyFrame.EasingFunction>
            </EasingDoubleKeyFrame>
        </DoubleAnimationUsingKeyFrames>
        <DoubleAnimationUsingKeyFrames Storyboard.TargetName="OverlayMask" Storyboard.TargetProperty="Opacity">
            <EasingDoubleKeyFrame KeyTime="00:00:00" Value="0"/>
            <EasingDoubleKeyFrame KeyTime="00:00:00.45" Value="1">
            </EasingDoubleKeyFrame>
        </DoubleAnimationUsingKeyFrames>
        <DoubleAnimationUsingKeyFrames Storyboard.TargetName="MaskBlurEffect" Storyboard.TargetProperty="Radius">
            <EasingDoubleKeyFrame KeyTime="00:00:00.0" Value="250"/>
            <EasingDoubleKeyFrame KeyTime="00:00:00.55" Value="0">
            </EasingDoubleKeyFrame>
        </DoubleAnimationUsingKeyFrames>
        <DoubleAnimationUsingKeyFrames Storyboard.TargetName="RootDropShadowEffect" Storyboard.TargetProperty="Opacity">
            <EasingDoubleKeyFrame KeyTime="00:00:00.75" Value="0"/>
            <EasingDoubleKeyFrame KeyTime="00:00:00.8000000" Value="0.7">
                <EasingDoubleKeyFrame.EasingFunction>
                    <CircleEase EasingMode="EaseIn"/>
                </EasingDoubleKeyFrame.EasingFunction>
            </EasingDoubleKeyFrame>
        </DoubleAnimationUsingKeyFrames>
        <DoubleAnimationUsingKeyFrames Storyboard.TargetName="GridOverlay" Storyboard.TargetProperty="(UIElement.Opacity)">
            <EasingDoubleKeyFrame KeyTime="00:00:00.7500000" Value="0"/>
            <EasingDoubleKeyFrame KeyTime="00:00:00.7500001" Value="1"/>
        </DoubleAnimationUsingKeyFrames>
    </Storyboard>

    <Storyboard x:Key="OverlayMaskOut">
        <DoubleAnimationUsingKeyFrames Storyboard.TargetName="GridContentRoot" Storyboard.TargetProperty="(UIElement.Opacity)">
            <EasingDoubleKeyFrame KeyTime="00:00:00" Value="0"/>
        </DoubleAnimationUsingKeyFrames>
        <DoubleAnimationUsingKeyFrames Storyboard.TargetName="GridOverlay" Storyboard.TargetProperty="(UIElement.Opacity)">
            <EasingDoubleKeyFrame KeyTime="00:00:00" Value="1"/>
            <EasingDoubleKeyFrame KeyTime="00:00:00.1000000" Value="1"/>
            <EasingDoubleKeyFrame KeyTime="00:00:00.3000000" Value="1"/>
        </DoubleAnimationUsingKeyFrames>
        <DoubleAnimationUsingKeyFrames Storyboard.TargetName="RootDropShadowEffect" Storyboard.TargetProperty="Opacity">
            <EasingDoubleKeyFrame KeyTime="00:00:00" Value="0.7"/>
            <!--<EasingDoubleKeyFrame KeyTime="00:00:00.1" Value="0.7"/>-->
            <EasingDoubleKeyFrame KeyTime="00:00:00.3000000" Value="0">
                <EasingDoubleKeyFrame.EasingFunction>
                    <CircleEase EasingMode="EaseIn"/>
                </EasingDoubleKeyFrame.EasingFunction>
            </EasingDoubleKeyFrame>
        </DoubleAnimationUsingKeyFrames>
        <!-- Mask out -->
        <DoubleAnimationUsingKeyFrames Storyboard.TargetName="OverlayMask" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)">
            <EasingDoubleKeyFrame KeyTime="00:00:00.0" Value="1"/>
            <EasingDoubleKeyFrame KeyTime="00:00:00.400" Value="0.2">
                <EasingDoubleKeyFrame.EasingFunction>
                    <CircleEase EasingMode="EaseInOut"/>
                </EasingDoubleKeyFrame.EasingFunction>
            </EasingDoubleKeyFrame>
        </DoubleAnimationUsingKeyFrames>
        <DoubleAnimationUsingKeyFrames Storyboard.TargetName="OverlayMask" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)">
            <EasingDoubleKeyFrame KeyTime="00:00:00.0" Value="1"/>
            <EasingDoubleKeyFrame KeyTime="00:00:00.400" Value="0.2">
                <EasingDoubleKeyFrame.EasingFunction>
                    <CircleEase EasingMode="EaseOut"/>
                </EasingDoubleKeyFrame.EasingFunction>
            </EasingDoubleKeyFrame>
        </DoubleAnimationUsingKeyFrames>
        <DoubleAnimationUsingKeyFrames Storyboard.TargetName="OverlayMask" Storyboard.TargetProperty="Opacity">
            <EasingDoubleKeyFrame KeyTime="00:00:00" Value="1"/>
            <EasingDoubleKeyFrame KeyTime="00:00:00.40" Value="0">
            </EasingDoubleKeyFrame>
        </DoubleAnimationUsingKeyFrames>
        <DoubleAnimationUsingKeyFrames Storyboard.TargetName="MaskBlurEffect" Storyboard.TargetProperty="Radius">
            <EasingDoubleKeyFrame KeyTime="00:00:00.0" Value="0"/>
            <EasingDoubleKeyFrame KeyTime="00:00:00.45" Value="300">
            </EasingDoubleKeyFrame>
        </DoubleAnimationUsingKeyFrames>
    </Storyboard>
    <Storyboard x:Key="OverlayOut">
        <DoubleAnimationUsingKeyFrames Storyboard.TargetName="GridContentRoot" Storyboard.TargetProperty="(UIElement.Opacity)">
            <EasingDoubleKeyFrame KeyTime="00:00:00" Value="0"/>
            <!--<EasingDoubleKeyFrame KeyTime="00:00:00.1000000" Value="0"/>-->
            <EasingDoubleKeyFrame KeyTime="00:00:00.3000000" Value="1"/>
        </DoubleAnimationUsingKeyFrames>
        <DoubleAnimationUsingKeyFrames Storyboard.TargetName="GridOverlay" Storyboard.TargetProperty="(UIElement.Opacity)">
            <EasingDoubleKeyFrame KeyTime="00:00:00" Value="1"/>
            <EasingDoubleKeyFrame KeyTime="00:00:00.1" Value="1"/>
            <EasingDoubleKeyFrame KeyTime="00:00:00.3000000" Value="0">
                <EasingDoubleKeyFrame.EasingFunction>
                    <CircleEase EasingMode="EaseIn"/>
                </EasingDoubleKeyFrame.EasingFunction>
            </EasingDoubleKeyFrame>
        </DoubleAnimationUsingKeyFrames>
        <DoubleAnimationUsingKeyFrames Storyboard.TargetName="RootDropShadowEffect" Storyboard.TargetProperty="Opacity">
            <!--<EasingDoubleKeyFrame KeyTime="00:00:00" Value="0.7"/>-->
            <!--<EasingDoubleKeyFrame KeyTime="00:00:00.1" Value="0.7"/>-->
            <EasingDoubleKeyFrame KeyTime="00:00:00.3000000" Value="0">
                <EasingDoubleKeyFrame.EasingFunction>
                    <CircleEase EasingMode="EaseIn"/>
                </EasingDoubleKeyFrame.EasingFunction>
            </EasingDoubleKeyFrame>
        </DoubleAnimationUsingKeyFrames>
        <!--<DoubleAnimationUsingKeyFrames Storyboard.TargetName="BackgroundBorderOverlay" Storyboard.TargetProperty="(UIElement.Opacity)">
                <EasingDoubleKeyFrame KeyTime="00:00:00" Value="1"/>
                <EasingDoubleKeyFrame KeyTime="00:00:00.1000000" Value="0">
                    <EasingDoubleKeyFrame.EasingFunction>
                        <QuinticEase EasingMode="EaseOut"/>
                    </EasingDoubleKeyFrame.EasingFunction>
                </EasingDoubleKeyFrame>
            </DoubleAnimationUsingKeyFrames>-->
    </Storyboard>
    <Storyboard x:Key="OverlayMaskOutDirect">
        <DoubleAnimationUsingKeyFrames Storyboard.TargetName="GridContentRoot" Storyboard.TargetProperty="(UIElement.Opacity)">
            <EasingDoubleKeyFrame KeyTime="00:00:00" Value="0"/>
            <EasingDoubleKeyFrame KeyTime="00:00:00.3000000" Value="1"/>
        </DoubleAnimationUsingKeyFrames>
        <DoubleAnimationUsingKeyFrames Storyboard.TargetName="GridOverlay" Storyboard.TargetProperty="(UIElement.Opacity)">
            <EasingDoubleKeyFrame KeyTime="00:00:00" Value="1"/>
            <EasingDoubleKeyFrame KeyTime="00:00:00.1000000" Value="0">
                <EasingDoubleKeyFrame.EasingFunction>
                    <CubicEase EasingMode="EaseOut"/>
                </EasingDoubleKeyFrame.EasingFunction>
            </EasingDoubleKeyFrame>
        </DoubleAnimationUsingKeyFrames>
        <DoubleAnimationUsingKeyFrames Storyboard.TargetName="OverlayMask" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)">
            <EasingDoubleKeyFrame KeyTime="00:00:00.0" Value="1"/>
            <EasingDoubleKeyFrame KeyTime="00:00:00.400" Value="0.2">
                <EasingDoubleKeyFrame.EasingFunction>
                    <CircleEase EasingMode="EaseInOut"/>
                </EasingDoubleKeyFrame.EasingFunction>
            </EasingDoubleKeyFrame>
        </DoubleAnimationUsingKeyFrames>
        <DoubleAnimationUsingKeyFrames Storyboard.TargetName="OverlayMask" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)">
            <EasingDoubleKeyFrame KeyTime="00:00:00.0" Value="1"/>
            <EasingDoubleKeyFrame KeyTime="00:00:00.400" Value="0.2">
                <EasingDoubleKeyFrame.EasingFunction>
                    <CircleEase EasingMode="EaseOut"/>
                </EasingDoubleKeyFrame.EasingFunction>
            </EasingDoubleKeyFrame>
        </DoubleAnimationUsingKeyFrames>
        <DoubleAnimationUsingKeyFrames Storyboard.TargetName="OverlayMask" Storyboard.TargetProperty="Opacity">
            <EasingDoubleKeyFrame KeyTime="00:00:00" Value="1"/>
            <EasingDoubleKeyFrame KeyTime="00:00:00.40" Value="0">
            </EasingDoubleKeyFrame>
        </DoubleAnimationUsingKeyFrames>
        <DoubleAnimationUsingKeyFrames Storyboard.TargetName="MaskBlurEffect" Storyboard.TargetProperty="Radius">
            <EasingDoubleKeyFrame KeyTime="00:00:00.0" Value="0"/>
            <EasingDoubleKeyFrame KeyTime="00:00:00.45" Value="300">
            </EasingDoubleKeyFrame>
        </DoubleAnimationUsingKeyFrames>
    </Storyboard>
</ResourceDictionary>