<UserControl
    x:Class="Pixeval.Controls.WaveProgressHeart"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:local="using:Pixeval.Controls"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    Padding="0,-1.5,-1.5,0"
    Loaded="WaveProgressHeart_OnLoaded"
    mc:Ignorable="d">
    <Viewbox>
        <Border
            x:Name="BorderClip"
            Width="50"
            Height="50"
            Background="{ThemeResource LayerFillColorDefaultBrush}">
            <ContentPresenter x:Name="Presenter">
                <ContentPresenter.TranslationTransition>
                    <Vector3Transition />
                </ContentPresenter.TranslationTransition>
                <Path
                    x:Name="PathWave"
                    Width="150"
                    Height="67.5"
                    Margin="0,0,-100,-5"
                    HorizontalAlignment="Left"
                    VerticalAlignment="Top"
                    Fill="Crimson"
                    IsHitTestVisible="False"
                    RenderTransformOrigin="0.5,0.5"
                    Stretch="Fill"
                    Stroke="{ThemeResource AccentAAFillColorSecondaryBrush}"
                    UseLayoutRounding="False">
                    <Path.RenderTransform>
                        <TranslateTransform />
                    </Path.RenderTransform>
                    <Path.Data>
                        <PathGeometry>
                            <PathFigure StartPoint="0,1">
                                <PolyBezierSegment Points="0.5,1 0.5,0 1,0" />
                                <PolyBezierSegment Points="1.5,0 1.5,1 2,1" />
                                <PolyBezierSegment Points="2.5,1 2.5,0 3,0" />
                                <PolyLineSegment Points="3,0 3,10, 0,10 0,1" />
                            </PathFigure>
                        </PathGeometry>
                    </Path.Data>
                </Path>
            </ContentPresenter>
        </Border>
        <VisualStateManager.VisualStateGroups>
            <VisualStateGroup x:Name="CommonStates">
                <VisualState x:Name="Indeterminate">
                    <Storyboard RepeatBehavior="Forever">
                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName="PathWave" Storyboard.TargetProperty="(UIElement.RenderTransform).(TranslateTransform.X)">
                            <EasingDoubleKeyFrame KeyTime="0:0:1" Value="-100" />
                        </DoubleAnimationUsingKeyFrames>
                    </Storyboard>
                </VisualState>
            </VisualStateGroup>
        </VisualStateManager.VisualStateGroups>
    </Viewbox>
</UserControl>
