110,502
社区成员
发帖
与我相关
我的任务
分享
private void FirestAni_MouseEnter(object sender, MouseEventArgs e)
{
Thread t1 = new Thread(Animation); //这里试试
t1.Start();
}
void Animation()
{
while (true)
{
DoubleAnimation widthAnimation = new DoubleAnimation();
widthAnimation.From = FirestAni.ActualWidth;
widthAnimation.To = this.Width - 30;
widthAnimation.AutoReverse = true;
widthAnimation.Completed += animation_Completed;
FirestAni.BeginAnimation(Button.WidthProperty, widthAnimation);
}
}