如果它只是放大和缩小,那很容易。
private void button1_Click(object sender, RoutedEventArgs e)
{
button1.BeginAnimation(Button.FontSizeProperty, new DoubleAnimation( 40,
new System.Windows.Duration(TimeSpan.FromSeconds(2)),
FillBehavior.Stop) { AutoReverse = true });
}
但是现在我希望当字体大小增加到40时,保持2秒,然后缩小。怎么做?