开发者

Silverlight DoubleAnimation: Set KeyProperties from Codebehind?

开发者 https://www.devze.com 2023-04-07 19:30 出处:网络
Hi I define my Storyboard as Resource in XAML: <Storyboard x:Name=\"vor\"> <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty=\"(UIElement.RenderTransform).(CompositeTransform.Translat

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

精彩评论

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