问题描述
xmal代码如下<Storyboardx:Name="Storyboard1"><DoubleAnimationUsingKeyFramesStoryboard.TargetProperty="(UIElement.Projection).(PlaneProjection.RotationY)"Storyboard.TargetName="image"><EasingDoubleKeyFrameKeyTime="0:0:1"Value="0"/><EasingDoubleKeyFrameKeyTime="0:0:1.5"Value="-90"/></DoubleAnimationUsingKeyFrames><DoubleAnimationDuration="0:0:1.5"To="1"Storyboard.TargetProperty="(UIElement.Opacity)"Storyboard.TargetName="image"d:IsOptimized="True"/><ObjectAnimationUsingKeyFramesStoryboard.TargetProperty="(UIElement.Visibility)"Storyboard.TargetName="image1"><DiscreteObjectKeyFrameKeyTime="0:0:1"><DiscreteObjectKeyFrame.Value><Visibility>Collapsed</Visibility></DiscreteObjectKeyFrame.Value></DiscreteObjectKeyFrame><DiscreteObjectKeyFrameKeyTime="0:0:1.5"><DiscreteObjectKeyFrame.Value><Visibility>Visible</Visibility></DiscreteObjectKeyFrame.Value></DiscreteObjectKeyFrame></ObjectAnimationUsingKeyFrames><DoubleAnimationUsingKeyFramesStoryboard.TargetProperty="(UIElement.Projection).(PlaneProjection.RotationY)"Storyboard.TargetName="image1"><EasingDoubleKeyFrameKeyTime="0:0:1"Value="0"/><EasingDoubleKeyFrameKeyTime="0:0:1.5"Value="90"/><EasingDoubleKeyFrameKeyTime="0:0:2"Value="0"/></DoubleAnimationUsingKeyFrames></Storyboard>
C#代码如下ImageImg=senderasImage;Img.Projection=newPlaneProjection();StoryboardRotateStory=newStoryboard();DoubleAnimationRotateAnimation=newDoubleAnimation();Storyboard.SetTarget(RotateAnimation,Img);Storyboard.SetTargetProperty(RotateAnimation,"(UIElement.Projection).(PlaneProjection.RotationY)");RotateAnimation.Duration=newTimeSpan(0,0,1);EasingDoubleKeyFrameFrame=newEasingDoubleKeyFrame();RotateAnimation.From=0;RotateAnimation.To=-90;Storyboard.SetTargetName(RotateAnimation,"Img");RotateStory.Children.Add(RotateAnimation);RotateStory.Begin();
现在只能实现一个动画,如何把keytime加进去??在线等,挺急的。多谢~!
解决方案
解决方案二:
照着Blend里面生成的用C#翻译一下就好了。。。
解决方案三:
才刚开始学,请问怎么翻译?
解决方案四:
没人??求指导啊、、、
解决方案五:
求大神指导啊