private void btnDesnaStrelica_Click(object sender, RoutedEventArgs e) { vrednost -= 750; brojac++; if (brojac == 3) { btnDesnaStrelica.Visibility = Visibility.Hidden; } else if (brojac == 0 || brojac == 1) { btnLevaStrelica.Visibility = Visibility.Visible; btnDesnaStrelica.Visibility = Visibility.Visible; } DoubleAnimation doubleAnimation = new DoubleAnimation(); PowerEase powerEase = new PowerEase(); powerEase.EasingMode = EasingMode.EaseInOut; powerEase.Power = 10; doubleAnimation.To = vrednost; doubleAnimation.Duration = new Duration(new TimeSpan(0, 0, 0, 0, 700)); // doubleAnimation.EasingFunction = powerEase; Grid1.BeginAnimation(Canvas.LeftProperty, doubleAnimation); Grid2.BeginAnimation(Canvas.LeftProperty, doubleAnimation); Grid3.BeginAnimation(Canvas.LeftProperty, doubleAnimation); Grid4.BeginAnimation(Canvas.LeftProperty, doubleAnimation); Grid5.BeginAnimation(Canvas.LeftProperty, doubleAnimation); Grid6.BeginAnimation(Canvas.LeftProperty, doubleAnimation); Grid7.BeginAnimation(Canvas.LeftProperty, doubleAnimation); }