0
<Storyboard x:Name="Storyboard1" Completed="Storyboard1_Completed">
<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Projection).(PlaneProjection.RotationY)" Storyboard.TargetName="imageBack1">
<EasingDoubleKeyFrame KeyTime="0:0:0.25" Value="90"/>
<EasingDoubleKeyFrame KeyTime="0:0:0.5" Value="0"/>
</DoubleAnimationUsingKeyFrames>
<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="imageBack1">
<DiscreteObjectKeyFrame KeyTime="0:0:0.25">
<DiscreteObjectKeyFrame.Value>
<Visibility>Visible</Visibility>
</DiscreteObjectKeyFrame.Value>
</DiscreteObjectKeyFrame>
</ObjectAnimationUsingKeyFrames>
<DoubleAnimation Duration="0:0:0.25" To="90" Storyboard.TargetProperty="(UIElement.Projection).(PlaneProjection.RotationY)" Storyboard.TargetName="image1" d:IsOptimized="True"/>
</Storyboard>
我正在做这样的如何在.cs代码文件中制作这种动画?
private Timeline CreateFlipAnimation(TimeSpan beginTime, UIElement target, UIElement target2)
{
DoubleAnimationUsingKeyFrames animation = new DoubleAnimationUsingKeyFrames(){
BeginTime = beginTime
};
//target.Projection = new PlaneProjection();
Storyboard.SetTargetProperty(animation, new PropertyPath(UIElement.ProjectionProperty));
Storyboard.SetTarget(animation, target);
animation.KeyFrames.Add(new EasingDoubleKeyFrame() { KeyTime = kt1, Value = 90 });
animation.KeyFrames.Add(new EasingDoubleKeyFrame() { KeyTime = kt2, Value = 0 });
ObjectAnimationUsingKeyFrames animation1 = new ObjectAnimationUsingKeyFrames()
{
BeginTime = beginTime
};
Storyboard.SetTargetProperty(animation1, new PropertyPath(UIElement.VisibilityProperty));
Storyboard.SetTarget(animation1, target);
animation1.KeyFrames.Add(new DiscreteObjectKeyFrame() { KeyTime = kt1, Value = Visibility.Visible });
DoubleAnimation animation2 = new DoubleAnimation()
{
//Duration = ,
To = 90
};
//target2.Projection = new PlaneProjection();
Storyboard.SetTargetProperty(animation2, new PropertyPath(UIElement.ProjectionProperty));
Storyboard.SetTarget(animation2, target2);
}
的东西,现在我不知道我怎样才能把这个.cs文件
<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Projection).(PlaneProjection.RotationY)" Storyboard.TargetName="imageBack1">
我评论过的部分,因此告诉我怎么能我继续这... ...? 也在持续时间我应该如何初始化值...
感谢您的帮助... – user1235555 2012-03-06 05:11:39