我最近开始学习WP8.1,目前我正在尝试使用动画。故事板动画不生动
我想要做的是动画像书页一样的启动画面:从后面来,然后,当它覆盖整个屏幕,然后触摸它,继续旋转,就像转动书页一样。 动画的第一部分是确定的,但我不知道为什么第二部分(第二个故事板)不是动画。过了一会儿,这个矩形只需要最后一个位置,而不需要动画(这很丑!)。
这里是我的故事板(注意复杂):
<Storyboard x:Name="EndgameSplashInStoryboard">
<!--<DoubleAnimation Duration="0:0:0.3" To="1" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="EndgameSplashGrid" d:IsOptimized="True"/>-->
<DoubleAnimation Duration="0:0:0.3" By="70" Storyboard.TargetProperty="(UIElement.Projection).(PlaneProjection.RotationY)" Storyboard.TargetName="EndgameSplashGrid" d:IsOptimized="True"/>
</Storyboard>
<Storyboard x:Name="EndgameSplashOutStoryboard">
<!--<DoubleAnimation Duration="0:0:0.3" To="0" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="EndgameSplashGrid" d:IsOptimized="True"/>-->
<DoubleAnimation Duration="0:0:0.3" By="70" Storyboard.TargetProperty="(UIElement.Projection).(PlaneProjection.RotationY)" Storyboard.TargetName="EndgameSplashGrid" d:IsOptimized="True"/>
</Storyboard>
我评论的不透明度动画,以简化我的动画。 这里是我想动画内容:
<Grid x:Name="EndgameSplashGrid">
<Grid.RowDefinitions>
<RowDefinition/>
<RowDefinition/>
</Grid.RowDefinitions>
<Grid.Projection>
<PlaneProjection x:Name="EndgameSplashProjection" RotationY="-70" CenterOfRotationX="0"/>
</Grid.Projection>
<Rectangle x:Name="EndgameSplashRectangle" Grid.RowSpan="2" Fill="{StaticResource PhoneAccentBrush}" Tapped="EndgameSplashRectangle_Tapped"/>
<TextBlock x:Name="EndgameSplashText" Grid.Row="0" Text="victoire!" Style="{StaticResource EndgameSplashText}"/>
<TextBlock x:Name="EndgameSplashSubtext" Grid.Row="1" TextWrapping="Wrap" Style="{StaticResource EndgameSplashSubtext}"
Text="Félicitations, vous avez trouvé le nombre en 7 essais :-)"/>
</Grid>
如果有人能看到为什么会这样,那将是非常有益的:) 谢谢你,有一个愉快的一天!
什么触发故事板?我看不到如何调用这些注释。 – 2015-04-02 14:12:46