尝试旋转红色圆圈和主圆圈,红色圆圈内的文字在旋转时应始终处于恒定位置。 以下是代码
<Grid x:Name="ImageGrid">
<Grid.Projection>
<PlaneProjection/>
</Grid.Projection>
<Grid x:Name="1grid" Margin="10,-176,10,10" Height="37" Width="37">
<Ellipse VerticalAlignment="Center" Fill="#E84C3D" Height="37" Width="37" StrokeThickness="5" Stroke="#E84C3D"/>
<TextBlock VerticalAlignment="Center" HorizontalAlignment="Center" Text="I"/>
</Grid>
<Image x:Name="ImageBlock" Source="Assets/ic_out_circle.png" Height="150" HorizontalAlignment="Center"
Stretch="Uniform" Width="230">
<Image.Triggers>
<EventTrigger RoutedEvent="Image.Loaded">
<BeginStoryboard>
<Storyboard x:Name="SpinAnimation">
<DoubleAnimation To="360" From="0" Duration="0:0:7" Storyboard.TargetName="ImageGrid"
Storyboard.TargetProperty="(UIElement.Projection).(PlaneProjection.RotationZ)"/>
</Storyboard>
</BeginStoryboard>
</EventTrigger>
</Image.Triggers>
</Image>
</Grid>
答案 0 :(得分:0)
以下是解决方案
"