Vb.net 使用关键帧获得双重动画的困难
我正在尝试将这个故事板xaml标记转换为vb代码。但是,当我运行代码时,什么都没有发生,没有引发异常或错误,什么都没有。我有什么遗漏吗 当从xaml运行时,故事板可以像预期的那样工作,但是在我的代码隐藏翻译过程中出现了一些问题 最后,我可以验证附加到故事板的目标元素是否确实存在 XMALVb.net 使用关键帧获得双重动画的困难,vb.net,xaml,windows-phone-8,windows-phone-8.1,Vb.net,Xaml,Windows Phone 8,Windows Phone 8.1,我正在尝试将这个故事板xaml标记转换为vb代码。但是,当我运行代码时,什么都没有发生,没有引发异常或错误,什么都没有。我有什么遗漏吗 当从xaml运行时,故事板可以像预期的那样工作,但是在我的代码隐藏翻译过程中出现了一些问题 最后,我可以验证附加到故事板的目标元素是否确实存在 XMAL <Storyboard x:Name="FlipAnimation"> <DoubleAnimationUsingKeyFrames Storyboard.TargetPro
<Storyboard x:Name="FlipAnimation">
<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Projection).(PlaneProjection.RotationY)" Storyboard.TargetName="Front">
<EasingDoubleKeyFrame KeyTime="0" Value="0"/>
<EasingDoubleKeyFrame KeyTime="0:0:0.2" Value="90"/>
</DoubleAnimationUsingKeyFrames>
<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Projection).(PlaneProjection.RotationY)" Storyboard.TargetName="Back">
<EasingDoubleKeyFrame KeyTime="0" Value="-90"/>
<EasingDoubleKeyFrame KeyTime="0:0:0.2" Value="-90"/>
<EasingDoubleKeyFrame KeyTime="0:0:0.4" Value="0"/>
</DoubleAnimationUsingKeyFrames>
</Storyboard>
看起来您在两个动画上绑定了不正确的属性路径。你想要
New PropertyPath("Projection.RotationY")
或许
New PropertyPath("(UIElement.Projection).(PlaneProjection.RotationY)")
因为
前面
和后面
不直接包含平面投影。旋转属性
尝试将持续时间
设置为第一个KF
New PropertyPath("(UIElement.Projection).(PlaneProjection.RotationY)")