开发者

Silverlight DoubleAnimation: Set KeyProperties from Codebehind?

Hi I define my Storyboard as Resource in 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>

and now I try to modify the Value from one of the EasingDoubleKeyFrames:

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

it doesn't work. You know why not?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜