Silverlight DoubleAnimation:从代码背后设置关键属性?

时间:2011-09-23 21:22:28

标签: silverlight storyboard

您好我在XAML中将我的故事板定义为资源:

<Storyboard x:Name="vor">
    <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(CompositeTransform.TranslateX)" Storyboard.TargetName="master">
            <EasingDoubleKeyFrame x:Name="point" KeyTime="0" Value="0"/>
            <EasingDoubleKeyFrame KeyTime="0:0:2" Value="700"/>
    </DoubleAnimationUsingKeyFrames>
</Storyboard>

现在我尝试修改其中一个EasingDoubleKeyFrames的值:

    private void test(object sender, RoutedEventArgs e)
    {
        point.SetValue(EasingDoubleKeyFrame.ValueProperty, 400);
        vor.Begin();
    }

它不起作用。你知道为什么不呢?

0 个答案:

没有答案