110,892
社区成员
发帖
与我相关
我的任务
分享
<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[2].(RotateTransform.Angle)" Storyboard.TargetName="image4">
<EasingDoubleKeyFrame KeyTime="0:0:1" Value="30">
<EasingDoubleKeyFrame.EasingFunction>
<CircleEase EasingMode="EaseInOut"/>
</EasingDoubleKeyFrame.EasingFunction>
</EasingDoubleKeyFrame>
</DoubleAnimationUsingKeyFrames>
DoubleAnimation daRotation = new DoubleAnimation();
daRotation.From = rd.Next(360);
daRotation.To = rd.Next(360);
daRotation.EasingFunction = new CircleEase() { EasingMode = EasingMode.EaseInOut };
daRotation.Duration = new TimeSpan(0, 0, 0, 0, 1500);
Storyboard.SetTargetProperty(daRotation, new PropertyPath("(UIElement.RenderTransform).(TransformGroup.Children)[2].(RotateTransform.Angle)"));
Storyboard.SetTarget(daRotation, element);
sb.Children.Add(daRotation);