Hi All,
I need to rotate a picture forever and change rotation ratio sometimes. My code is:
<Image x:Name="image" Source="cpuspin-icons.ico" MaxWidth="250" MaxHeight="250" RenderTransformOrigin="0.5,0.5"><Image.RenderTransform><RotateTransform x:Name="TransRotate" CenterX="0" CenterY="0" Angle="0" /></Image.RenderTransform><Image.Resources><Storyboard x:Key="spin"><DoubleAnimation x:Name="da" Storyboard.TargetName="TransRotate" Storyboard.TargetProperty="Angle" By="360" Duration="0:1:40" AutoReverse="False" RepeatBehavior="Forever" /></Storyboard></Image.Resources><Image.Triggers><EventTrigger RoutedEvent="FrameworkElement.Loaded"><EventTrigger.Actions><BeginStoryboard x:Name="cpuspin" Storyboard="{StaticResource spin}" /></EventTrigger.Actions></EventTrigger></Image.Triggers></Image>
this.cpuspin.Storyboard.SetSpeedRatio(this.image, 12.0);
The image is a circle. it works. but there is a problem: Sometimes the rotation will be paused a second. The rotation will work forever but sometimes it looks like a "jump", looks like the end point after rotating a circle is not the start point of the new circle. My English is bad, I am not sure I describe the appearance clear or not.
Any ideas? Thanks a lot.