如何使图像绕 z 轴自旋/旋转
我想在 Z 轴上旋转/旋转我的徽标(图像)。
这是我到目前为止的代码:
<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"
By="360"
Duration="0:0:10"
AutoReverse="False"
RepeatBehavior="Forever" />
</Storyboard>
</BeginStoryboard>
</EventTrigger>
</Image.Triggers>
</Image>
这只在 X 轴上旋转。
我需要做什么才能让它在 Z 轴上旋转?
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"
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?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
你的意思是这样的吗?
或者
Do you mean something like this?
or