我有一个动画,让图像轮永远旋转。这是我的代码:
<Image Name="BigWheelImage"
Source="{DynamicResource BigWheel}"
Height="400"
Width="400" >
<Image.RenderTransform>
<RotateTransform
CenterX="200"
CenterY="200" />
</Image.RenderTransform>
<Image.LayoutTransform>
<TranslateTransform X="0" Y="0" />
</Image.LayoutTransform>
<Image.Style>
<Style>
<Style.Triggers>
<Trigger Property="Image.IsEnabled" Value="True">
<Trigger.EnterActions>
<BeginStoryboard>
<Storyboard RepeatBehavior="Forever" DesiredFrameRate="30">
<DoubleAnimation Storyboard.TargetProperty="RenderTransform.Angle"
From="360" To="0" Duration="0:0:35" BeginTime="00:00:00.000" />
</Storyboard>
</BeginStoryboard>
</Trigger.EnterActions>
</Trigger>
</Style.Triggers>
</Style>
</Image.Style>
</Image>
但是当我运行应用程序时,滚轮不能平稳旋转。它“跳”。我在阅读here时尝试修改DesiredFrameRated
,但没有运气。
有关如何使动画看起来流畅的想法吗?