I would like to spin/rotate my Logo(Image) on the Z axis.
This is the code i have so far:
<Image Name="logo" Grid.Row="1" Grid.Column="0" Source="someLogoPath" Width="140" Height="140" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="0,10,0,0">
<Image.RenderTransform>
<RotateTransform x:Name="TransRotate" />
</Image.RenderTransform>
<Image.Triggers>
<EventTrigger RoutedEvent="Image.Loaded">
<BeginStoryboard>
<Storyboard TargetProperty="Angle">
<DoubleAnimation
Storyboard.TargetName="TransRotate"
Storyboard.TargetProperty="Angle"
开发者_StackOverflow By="360"
Duration="0:0:10"
AutoReverse="False"
RepeatBehavior="Forever" />
</Storyboard>
</BeginStoryboard>
</EventTrigger>
</Image.Triggers>
</Image>
This only spins it on the X axis.
What do i need to do, to get it to spin on the Z axis?
Do you mean something like this?
<Image.RenderTransform>
<RotateTransform x:Name="TransRotate" CenterX="70" CenterY="70" />
</Image.RenderTransform>
or
<Image Name="logo" RenderTransformOrigin="0.5,0.5" />
精彩评论