How to make a image swivel in wpf?
I was looking at this post.
I was wondering if it was possible to make a image swivel in wpf?
If not, how would i change the s开发者_如何学Goolution to make my WPF image swivel repeatedly?
I found this simple solution:
This is all you need.
<pl:Planerator Name="planerator">
<Image Name="logo"
Source="somePath" >
<Image.Triggers>
<EventTrigger RoutedEvent="Image.Loaded">
<BeginStoryboard>
<Storyboard TargetProperty="ScaleX" RepeatBehavior="Forever">
<DoubleAnimation Storyboard.TargetName="planerator"
Storyboard.TargetProperty="RotationY"
From="0" To="360"
BeginTime="0:0:0"
Duration="0:0:5"
AutoReverse="False"/>
</Storyboard>
</BeginStoryboard>
</EventTrigger>
</Image.Triggers>
</Image>
</pl:Planerator>
精彩评论