0

我们如何在 xaml c# DoubleAnimation 中移动 ScrollViewer 的水平偏移量

 DoubleAnimation verticalAnimation = new DoubleAnimation();

 verticalAnimation.From = 0;
 verticalAnimation.To = 87;
 verticalAnimation.Duration = TimeSpan.FromSeconds(10);       

 storyboard = new Storyboard();

 storyboard.Children.Add(verticalAnimation);
 Storyboard.SetTarget(verticalAnimation, scrolviewer);
 Storyboard.SetTargetProperty(verticalAnimation, "HorizontalOffset");
 storyboard.Begin();

上面的代码不起作用

4

0 回答 0