代码拉取完成,页面将自动刷新
<Window x:Class="WPFTest1.MainWindow"
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:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:WPFTest1"
mc:Ignorable="d"
Title="MainWindow" Height="450" Width="450">
<Grid Background="Transparent" Margin="60" Name="Stage" ClipToBounds="True">
<Button Width="70" Height="30" Margin="0,200,0,0" Content="start">
<Button.Triggers>
<EventTrigger RoutedEvent="Button.Click">
<BeginStoryboard >
<Storyboard>
<!--关键帧动画-->
<DoubleAnimationUsingKeyFrames RepeatBehavior="Forever" BeginTime="0:0:0"
Storyboard.TargetName="element1"
Storyboard.TargetProperty="RenderTransform.Angle">
<SplineDoubleKeyFrame Value="0" KeyTime="0:0:0"/>
<SplineDoubleKeyFrame Value="360" KeyTime="0:0:2" KeySpline="0.1,0.49,0.91,0.5"/>
<SplineDoubleKeyFrame Value="720" KeyTime="0:0:4" KeySpline="0.1,0.5,0.91,0.51" />
</DoubleAnimationUsingKeyFrames>
<DoubleAnimationUsingKeyFrames RepeatBehavior="Forever" BeginTime="0:0:0.2"
Storyboard.TargetName="element2"
Storyboard.TargetProperty="RenderTransform.Angle">
<SplineDoubleKeyFrame Value="0" KeyTime="0:0:0"/>
<SplineDoubleKeyFrame Value="360" KeyTime="0:0:2" KeySpline="0.1,0.49,0.91,0.5"/>
<SplineDoubleKeyFrame Value="720" KeyTime="0:0:4" KeySpline="0.1,0.5,0.91,0.51" />
</DoubleAnimationUsingKeyFrames>
<DoubleAnimationUsingKeyFrames RepeatBehavior="Forever" BeginTime="0:0:0.4"
Storyboard.TargetName="element3"
Storyboard.TargetProperty="RenderTransform.Angle">
<SplineDoubleKeyFrame Value="0" KeyTime="0:0:0"/>
<SplineDoubleKeyFrame Value="360" KeyTime="0:0:2" KeySpline="0.1,0.49,0.91,0.5"/>
<SplineDoubleKeyFrame Value="720" KeyTime="0:0:4" KeySpline="0.1,0.5,0.91,0.51" />
</DoubleAnimationUsingKeyFrames>
<DoubleAnimationUsingKeyFrames RepeatBehavior="Forever" BeginTime="0:0:0.6"
Storyboard.TargetName="element4"
Storyboard.TargetProperty="RenderTransform.Angle">
<SplineDoubleKeyFrame Value="0" KeyTime="0:0:0"/>
<SplineDoubleKeyFrame Value="360" KeyTime="0:0:2" KeySpline="0.1,0.49,0.91,0.5"/>
<SplineDoubleKeyFrame Value="720" KeyTime="0:0:4" KeySpline="0.1,0.5,0.91,0.51" />
</DoubleAnimationUsingKeyFrames>
<DoubleAnimationUsingKeyFrames RepeatBehavior="Forever" BeginTime="0:0:0.8"
Storyboard.TargetName="element5"
Storyboard.TargetProperty="RenderTransform.Angle">
<SplineDoubleKeyFrame Value="0" KeyTime="0:0:0"/>
<SplineDoubleKeyFrame Value="360" KeyTime="0:0:2" KeySpline="0.1,0.49,0.91,0.5"/>
<SplineDoubleKeyFrame Value="720" KeyTime="0:0:4" KeySpline="0.1,0.5,0.91,0.51" />
</DoubleAnimationUsingKeyFrames>
</Storyboard>
</BeginStoryboard>
</EventTrigger>
</Button.Triggers>
</Button>
<Grid Width="100" Height="100">
<ContentControl RenderTransformOrigin="0.5,0.5" Name="element1">
<ContentControl.RenderTransform >
<RotateTransform Angle="0"/>
</ContentControl.RenderTransform>
<Ellipse Fill="#FF5A5858" Width="10" Height="10" VerticalAlignment="Bottom"/>
</ContentControl>
<ContentControl RenderTransformOrigin="0.5,0.5" Name="element2">
<ContentControl.RenderTransform >
<RotateTransform Angle="0"/>
</ContentControl.RenderTransform>
<Ellipse Fill="#FF5A5858" Width="10" Height="10" VerticalAlignment="Bottom"/>
</ContentControl>
<ContentControl RenderTransformOrigin="0.5,0.5" Name="element3">
<ContentControl.RenderTransform >
<RotateTransform Angle="0"/>
</ContentControl.RenderTransform>
<Ellipse Fill="#FF5A5858" Width="10" Height="10" VerticalAlignment="Bottom"/>
</ContentControl>
<ContentControl RenderTransformOrigin="0.5,0.5" Name="element4">
<ContentControl.RenderTransform >
<RotateTransform Angle="0"/>
</ContentControl.RenderTransform>
<Ellipse Fill="#FF5A5858" Width="10" Height="10" VerticalAlignment="Bottom"/>
</ContentControl>
<ContentControl RenderTransformOrigin="0.5,0.5" Name="element5">
<ContentControl.RenderTransform >
<RotateTransform Angle="0"/>
</ContentControl.RenderTransform>
<Ellipse Fill="#FF5A5858" Width="10" Height="10" VerticalAlignment="Bottom"/>
</ContentControl>
</Grid>
</Grid>
</Window>
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。