Animation 如何使用淡入淡出效果设置项目的动画
根据某些标准,我需要在页面屏幕顶部淡入或淡出项目。这些项目包含一个图像,将来可能还包含一些按钮。我遇到了WP8.1,但如何在WP8.0中实现这一点?您应该使用Blend创建自己的自定义动画。通过调整控件的不透明度级别可以实现淡入或淡出。你可以跟着这个。再来一个 例如,如果您想对图像应用淡入效果,这里有一个示例代码Animation 如何使用淡入淡出效果设置项目的动画,animation,windows-phone-8,fadein,fadeout,Animation,Windows Phone 8,Fadein,Fadeout,根据某些标准,我需要在页面屏幕顶部淡入或淡出项目。这些项目包含一个图像,将来可能还包含一些按钮。我遇到了WP8.1,但如何在WP8.0中实现这一点?您应该使用Blend创建自己的自定义动画。通过调整控件的不透明度级别可以实现淡入或淡出。你可以跟着这个。再来一个 例如,如果您想对图像应用淡入效果,这里有一个示例代码 <phone:PhoneApplicationPage.Resources> <Storyboard x:Name="fadeInImage">
<phone:PhoneApplicationPage.Resources>
<Storyboard x:Name="fadeInImage">
<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="image">
<EasingDoubleKeyFrame KeyTime="0" Value="0.1"/>
<EasingDoubleKeyFrame KeyTime="0:0:0.2" Value="0.3"/>
<EasingDoubleKeyFrame KeyTime="0:0:0.4" Value="0.5"/>
<EasingDoubleKeyFrame KeyTime="0:0:0.6" Value="0.7"/>
<EasingDoubleKeyFrame KeyTime="0:0:0.8" Value="0.9"/>
<EasingDoubleKeyFrame KeyTime="0:0:1" Value="1"/>
</DoubleAnimationUsingKeyFrames>
</Storyboard>
</phone:PhoneApplicationPage.Resources>
fadeInImage.Begin();