<UserControl x:Class="HandyControlDemo.UserControl.GeometryAnimationDemoCtl"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:hc="https://handyorg.github.io/handycontrol"
             Background="{DynamicResource RegionBrush}"
             Width="200">
    <UserControl.Resources>
        <Storyboard x:Key="StoryboardOnLoaded" RepeatBehavior="Forever" AutoReverse="True">
            <hc:GeometryAnimationUsingKeyFrames Storyboard.TargetProperty="Data" Storyboard.TargetName="PathDemo">
                <hc:DiscreteGeometryKeyFrame KeyTime="0:0:0.7" Value="{StaticResource FaceBookGeometry}"/>
                <hc:EasingGeometryKeyFrame KeyTime="0:0:1.2" Value="{StaticResource TwitterGeometry}">
                    <hc:EasingGeometryKeyFrame.EasingFunction>
                        <QuarticEase EasingMode="EaseInOut"/>
                    </hc:EasingGeometryKeyFrame.EasingFunction>
                </hc:EasingGeometryKeyFrame>
            </hc:GeometryAnimationUsingKeyFrames>
            <ColorAnimationUsingKeyFrames Storyboard.TargetProperty="Fill.(SolidColorBrush.Color)" Storyboard.TargetName="PathDemo">
                <DiscreteColorKeyFrame KeyTime="0:0:0.7" Value="#3b5998"/>
                <EasingColorKeyFrame KeyTime="0:0:1.2" Value="#4099ff">
                    <EasingColorKeyFrame.EasingFunction>
                        <QuarticEase EasingMode="EaseInOut"/>
                    </EasingColorKeyFrame.EasingFunction>
                </EasingColorKeyFrame>
                <EasingColorKeyFrame KeyTime="0:0:1.9" Value="#4099ff"/>
            </ColorAnimationUsingKeyFrames>
        </Storyboard>
    </UserControl.Resources>
    <UserControl.Triggers>
        <EventTrigger RoutedEvent="FrameworkElement.Loaded">
            <BeginStoryboard Name="BeginStoryboard" Storyboard="{StaticResource StoryboardOnLoaded}"/>
        </EventTrigger>
        <EventTrigger RoutedEvent="FrameworkElement.Unloaded">
            <StopStoryboard BeginStoryboardName="BeginStoryboard"/>
        </EventTrigger>
    </UserControl.Triggers>
    <hc:TransitioningContentControl>
        <Path Name="PathDemo" Width="100" Height="100" Data="{StaticResource FaceBookGeometry}" Fill="#3b5998"/>
    </hc:TransitioningContentControl>
</UserControl>
