<UserControl x:Class="StartServerWPF.Modules.Main.Views.Loading"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             mc:Ignorable="d" 
             d:DesignHeight="100" d:DesignWidth="100">
    <UserControl.Resources>
        <KeySpline x:Key="keySpline">0.1,0.4,0.9,0.6</KeySpline>

        <Storyboard x:Key="keyFrameStoryboard1">
            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="e1" Storyboard.TargetProperty="Opacity" RepeatBehavior="Forever">
                <DiscreteDoubleKeyFrame KeyTime="0:0:0" Value="0"/>
                <DiscreteDoubleKeyFrame KeyTime="0:0:0.3" Value="1"/>
                <DiscreteDoubleKeyFrame KeyTime="0:0:5" Value="0"/>
                <DiscreteDoubleKeyFrame KeyTime="0:0:6" Value="0"/>
            </DoubleAnimationUsingKeyFrames>
            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="rt1" Storyboard.TargetProperty="Angle" RepeatBehavior="Forever">
                <SplineDoubleKeyFrame KeyTime="0:0:0.3" Value="0" KeySpline="{StaticResource keySpline}"/>
                <SplineDoubleKeyFrame KeyTime="0:0:2.5" Value="360" KeySpline="{StaticResource keySpline}"/>
                <SplineDoubleKeyFrame KeyTime="0:0:5" Value="720" KeySpline="{StaticResource keySpline}"/>
                <DiscreteDoubleKeyFrame KeyTime="0:0:6" Value="720"/>
            </DoubleAnimationUsingKeyFrames>

            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="e2" Storyboard.TargetProperty="Opacity" BeginTime="0:0:0.2" RepeatBehavior="Forever">
                <DiscreteDoubleKeyFrame KeyTime="0:0:0" Value="0"/>
                <DiscreteDoubleKeyFrame KeyTime="0:0:0.3" Value="1"/>
                <DiscreteDoubleKeyFrame KeyTime="0:0:5" Value="0"/>
                <DiscreteDoubleKeyFrame KeyTime="0:0:6" Value="0"/>
            </DoubleAnimationUsingKeyFrames>
            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="rt2" Storyboard.TargetProperty="Angle" BeginTime="0:0:0.2" RepeatBehavior="Forever">
                <SplineDoubleKeyFrame KeyTime="0:0:0.3" Value="0" KeySpline="{StaticResource keySpline}"/>
                <SplineDoubleKeyFrame KeyTime="0:0:2.5" Value="360" KeySpline="{StaticResource keySpline}"/>
                <SplineDoubleKeyFrame KeyTime="0:0:5" Value="720" KeySpline="{StaticResource keySpline}"/>
                <DiscreteDoubleKeyFrame KeyTime="0:0:6" Value="720"/>
            </DoubleAnimationUsingKeyFrames>

            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="e3" Storyboard.TargetProperty="Opacity" BeginTime="0:0:0.4" RepeatBehavior="Forever">
                <DiscreteDoubleKeyFrame KeyTime="0:0:0" Value="0"/>
                <DiscreteDoubleKeyFrame KeyTime="0:0:0.3" Value="1"/>
                <DiscreteDoubleKeyFrame KeyTime="0:0:5" Value="0"/>
                <DiscreteDoubleKeyFrame KeyTime="0:0:6" Value="0"/>
            </DoubleAnimationUsingKeyFrames>
            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="rt3" Storyboard.TargetProperty="Angle" BeginTime="0:0:0.4" RepeatBehavior="Forever">
                <SplineDoubleKeyFrame KeyTime="0:0:0.3" Value="0" KeySpline="{StaticResource keySpline}"/>
                <SplineDoubleKeyFrame KeyTime="0:0:2.5" Value="360" KeySpline="{StaticResource keySpline}"/>
                <SplineDoubleKeyFrame KeyTime="0:0:5" Value="720" KeySpline="{StaticResource keySpline}"/>
                <DiscreteDoubleKeyFrame KeyTime="0:0:6" Value="720"/>
            </DoubleAnimationUsingKeyFrames>

            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="e4" Storyboard.TargetProperty="Opacity" BeginTime="0:0:0.6" RepeatBehavior="Forever">
                <DiscreteDoubleKeyFrame KeyTime="0:0:0" Value="0"/>
                <DiscreteDoubleKeyFrame KeyTime="0:0:0.3" Value="1"/>
                <DiscreteDoubleKeyFrame KeyTime="0:0:5" Value="0"/>
                <DiscreteDoubleKeyFrame KeyTime="0:0:6" Value="0"/>
            </DoubleAnimationUsingKeyFrames>
            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="rt4" Storyboard.TargetProperty="Angle" BeginTime="0:0:0.6" RepeatBehavior="Forever">
                <SplineDoubleKeyFrame KeyTime="0:0:0.3" Value="0" KeySpline="{StaticResource keySpline}"/>
                <SplineDoubleKeyFrame KeyTime="0:0:2.5" Value="360" KeySpline="{StaticResource keySpline}"/>
                <SplineDoubleKeyFrame KeyTime="0:0:5" Value="720" KeySpline="{StaticResource keySpline}"/>
                <DiscreteDoubleKeyFrame KeyTime="0:0:6" Value="720"/>
            </DoubleAnimationUsingKeyFrames>

            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="e5" Storyboard.TargetProperty="Opacity" BeginTime="0:0:0.8" RepeatBehavior="Forever">
                <DiscreteDoubleKeyFrame KeyTime="0:0:0" Value="0"/>
                <DiscreteDoubleKeyFrame KeyTime="0:0:0.3" Value="1"/>
                <DiscreteDoubleKeyFrame KeyTime="0:0:5" Value="0"/>
                <DiscreteDoubleKeyFrame KeyTime="0:0:6" Value="0"/>
            </DoubleAnimationUsingKeyFrames>
            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="rt5" Storyboard.TargetProperty="Angle" BeginTime="0:0:0.8" RepeatBehavior="Forever">
                <SplineDoubleKeyFrame KeyTime="0:0:0.3" Value="0" KeySpline="{StaticResource keySpline}"/>
                <SplineDoubleKeyFrame KeyTime="0:0:2.5" Value="360" KeySpline="{StaticResource keySpline}"/>
                <SplineDoubleKeyFrame KeyTime="0:0:5" Value="720" KeySpline="{StaticResource keySpline}"/>
                <DiscreteDoubleKeyFrame KeyTime="0:0:6" Value="720"/>
            </DoubleAnimationUsingKeyFrames>

            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="e6" Storyboard.TargetProperty="Opacity" BeginTime="0:0:1" RepeatBehavior="Forever">
                <DiscreteDoubleKeyFrame KeyTime="0:0:0" Value="0"/>
                <DiscreteDoubleKeyFrame KeyTime="0:0:0.3" Value="1"/>
                <DiscreteDoubleKeyFrame KeyTime="0:0:5" Value="0"/>
                <DiscreteDoubleKeyFrame KeyTime="0:0:6" Value="0"/>
            </DoubleAnimationUsingKeyFrames>
            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="rt6" Storyboard.TargetProperty="Angle" BeginTime="0:0:1" RepeatBehavior="Forever">
                <SplineDoubleKeyFrame KeyTime="0:0:0.3" Value="0" KeySpline="{StaticResource keySpline}"/>
                <SplineDoubleKeyFrame KeyTime="0:0:2.5" Value="360" KeySpline="{StaticResource keySpline}"/>
                <SplineDoubleKeyFrame KeyTime="0:0:5" Value="720" KeySpline="{StaticResource keySpline}"/>
                <DiscreteDoubleKeyFrame KeyTime="0:0:6" Value="720"/>
            </DoubleAnimationUsingKeyFrames>
        </Storyboard>
    </UserControl.Resources>
    <UserControl.Triggers>
        <EventTrigger RoutedEvent="UserControl.Loaded">
            <BeginStoryboard Storyboard="{StaticResource keyFrameStoryboard1}"/>
        </EventTrigger>
    </UserControl.Triggers>
    <Grid Height="140">
        <Grid.RowDefinitions>
            <RowDefinition Height="auto"/>
            <RowDefinition Height="auto"/>
            <RowDefinition Height="auto"/>
        </Grid.RowDefinitions>
        <Grid Height="70" Width="70">
            <Border RenderTransformOrigin="0.5,0.5">
                <Border.RenderTransform>
                    <RotateTransform Angle="0" x:Name="rt1"/>
                </Border.RenderTransform>
                <Ellipse Fill="Orange" Width="8" Height="8" VerticalAlignment="Bottom" Name="e1"/>
            </Border>
            <Border RenderTransformOrigin="0.5,0.5">
                <Border.RenderTransform>
                    <RotateTransform Angle="0" x:Name="rt2"/>
                </Border.RenderTransform>
                <Ellipse Fill="Orange" Width="8" Height="8" VerticalAlignment="Bottom" Name="e2"/>
            </Border>
            <Border RenderTransformOrigin="0.5,0.5">
                <Border.RenderTransform>
                    <RotateTransform Angle="0" x:Name="rt3"/>
                </Border.RenderTransform>
                <Ellipse Fill="Orange" Width="8" Height="8" VerticalAlignment="Bottom" Name="e3"/>
            </Border>
            <Border RenderTransformOrigin="0.5,0.5">
                <Border.RenderTransform>
                    <RotateTransform Angle="0" x:Name="rt4"/>
                </Border.RenderTransform>
                <Ellipse Fill="Orange" Width="8" Height="8" VerticalAlignment="Bottom" Name="e4"/>
            </Border>
            <Border RenderTransformOrigin="0.5,0.5">
                <Border.RenderTransform>
                    <RotateTransform Angle="0" x:Name="rt5"/>
                </Border.RenderTransform>
                <Ellipse Fill="Orange" Width="8" Height="8" VerticalAlignment="Bottom" Name="e5"/>
            </Border>
            <Border RenderTransformOrigin="0.5,0.5">
                <Border.RenderTransform>
                    <RotateTransform Angle="0" x:Name="rt6"/>
                </Border.RenderTransform>
                <Ellipse Fill="Orange" Width="8" Height="8" VerticalAlignment="Bottom" Name="e6"/>
            </Border>
        </Grid>

        <TextBlock Text="{Binding Message,RelativeSource={RelativeSource AncestorType=UserControl,Mode=FindAncestor}}"
                   Grid.Row="1" VerticalAlignment="Center" HorizontalAlignment="Center" Foreground="#333"
                   Margin="0,10"/>
        <TextBlock Grid.Row="2" Margin="0,10" Foreground="Orange" VerticalAlignment="Center" HorizontalAlignment="Center"
                   Visibility="Collapsed">
            <!--<Hyperlink Command="{Binding CancelLoadingCommand}">取消</Hyperlink>-->
        </TextBlock>
    </Grid>
</UserControl>
