如何在运行时为TargetName设置DoubleAnimationUsingKeyFrames?
<Storyboard x:Name="sr">
    <DoubleAnimationUsingKeyFrames x:Name="keyFrameDA" Storyboard.TargetProperty="(UIElement.Projection).(PlaneProjection.RotationX)"  Storyboard.TargetName="cardBack">
        <EasingDoubleKeyFrame KeyTime="0" Value="0"/>
        <EasingDoubleKeyFrame KeyTime="0:0:1" Value="0"/>
    </DoubleAnimationUsingKeyFrames>
</Storyboard>我试过了
Storyboard.SetTargetName(keyFrameDA, "cardBack");但是DoubleAnimationUsingKeyFrames没有这样的属性。谢谢。
更新:当我使用以下代码时会抛出此错误:
Storyboard.SetTargetProperty(keyFrameDa, new PropertyPath(PlaneProjection.RotationXProperty));
Storyboard.SetTarget(keyFrameDa, cardBack.Projection);错误: KeyFramesProperty -无法获取字段'KeyFramesProperty‘的值,因为包含类的信息不可用。
发布于 2012-10-02 16:18:56
好吧,这个怎么样..。
Storyboard.SetTargetProperty(keyFrameDa, new PropertyPath(PlaneProjection.RotationXProperty));
Storyboard.SetTarget(keyFrameDa, cardBack.Projection);https://stackoverflow.com/questions/12694136
复制相似问题