我有两个画布和一个名为 tbmarquee 的文本块,在窗口加载时它会从上到下进行动画处理,但是当我越过它时我想停下来,当我点击它时会转到链接,怎么做?
void Window1_Loaded(object sender, RoutedEventArgs e)
{
DoubleAnimation doubleAnimation = new DoubleAnimation();
doubleAnimation.From = -tbmarquee.ActualHeight;
doubleAnimation.To = canMain.ActualHeight;
doubleAnimation.RepeatBehavior = RepeatBehavior.Forever;
doubleAnimation.Duration = new Duration(TimeSpan.Parse("0:0:10"));
tbmarquee.BeginAnimation(Canvas.TopProperty, doubleAnimation);
}