您好我在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();
}
它不起作用。你知道为什么不呢?