1引用资源
<Storyboard x:Key="logoAyStory" RepeatBehavior="Forever">
<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.Y)" Storyboard.TargetName="textBlock">
<EasingDoubleKeyFrame KeyTime="0" Value="0"/>
<EasingDoubleKeyFrame KeyTime="0:0:0.2" Value="-9"/>
<EasingDoubleKeyFrame KeyTime="0:0:0.4" Value="0"/>
</DoubleAnimationUsingKeyFrames>
<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.Y)" Storyboard.TargetName="textBlock1">
<EasingDoubleKeyFrame KeyTime="0:0:0.2" Value="-1.5"/>
<EasingDoubleKeyFrame KeyTime="0:0:0.4" Value="-9"/>
<EasingDoubleKeyFrame KeyTime="0:0:0.6" Value="0"/>
</DoubleAnimationUsingKeyFrames>
<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.Y)" Storyboard.TargetName="textBlock2">
<EasingDoubleKeyFrame KeyTime="0:0:0.2" Value="-1.333"/>
<EasingDoubleKeyFrame KeyTime="0:0:0.6" Value="-9"/>
<EasingDoubleKeyFrame KeyTime="0:0:0.8" Value="0"/>
</DoubleAnimationUsingKeyFrames>
<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.Y)" Storyboard.TargetName="textBlock3">
<EasingDoubleKeyFrame KeyTime="0:0:0.8" Value="-9"/>
<EasingDoubleKeyFrame KeyTime="0:0:1" Value="0"/>
<EasingDoubleKeyFrame KeyTime="0:0:3" Value="0"/>
</DoubleAnimationUsingKeyFrames>
</Storyboard>
<EventTrigger RoutedEvent="FrameworkElement.Loaded">
<BeginStoryboard x:Name="logoAyStory_BeginStoryboard" Storyboard="{StaticResource logoAyStory}"/>
<BeginStoryboard x:Name="logoAyStory_BeginStoryboard1" Storyboard="{StaticResource logoAyStory1}"/>
</EventTrigger>
2创建
<StackPanel Orientation="Horizontal" Canvas.Left="121" Canvas.Top="40" SnapsToDevicePixels="True" UseLayoutRounding="True" MouseLeftButtonDown="clickLogin_MouseLeftButtonDown" x:Name="clickLogin" Visibility="Hidden">
<TextBlock x:Name="textBlock" TextWrapping="Wrap" Text="点" FontSize="14" Foreground="White" UseLayoutRounding="True" RenderTransformOrigin="0.5,0.5">
<TextBlock.RenderTransform>
<TransformGroup>
<ScaleTransform/>
<SkewTransform/>
<RotateTransform/>
<TranslateTransform/>
</TransformGroup>
</TextBlock.RenderTransform>
</TextBlock>
<TextBlock x:Name="textBlock1" TextWrapping="Wrap" Text="我" FontSize="14" Margin="3,0,0,0" UseLayoutRounding="True" Foreground="White" RenderTransformOrigin="0.5,0.5">
<TextBlock.RenderTransform>
<TransformGroup>
<ScaleTransform/>
<SkewTransform/>
<RotateTransform/>
<TranslateTransform/>
</TransformGroup>
</TextBlock.RenderTransform>
</TextBlock>
<TextBlock x:Name="textBlock2" TextWrapping="Wrap" Text="登" FontSize="14" Margin="3,0,0,0" UseLayoutRounding="True" Foreground="White" RenderTransformOrigin="0.5,0.5">
<TextBlock.RenderTransform>
<TransformGroup>
<ScaleTransform/>
<SkewTransform/>
<RotateTransform/>
<TranslateTransform/>
</TransformGroup>
</TextBlock.RenderTransform>
</TextBlock>
<TextBlock x:Name="textBlock3" TextWrapping="Wrap" Text="陆" FontSize="14" Margin="3,0,0,0" UseLayoutRounding="True" Foreground="White" RenderTransformOrigin="0.5,0.5">
<TextBlock.RenderTransform>
<TransformGroup>
<ScaleTransform/>
<SkewTransform/>
<RotateTransform/>
<TranslateTransform/>
</TransformGroup>
</TextBlock.RenderTransform>
</TextBlock>
</StackPanel>