private void Back_MouseLeftButtonDown(object sender, MouseButtonEventArgs e) { if (state <= -376) { state += 376; } DoubleAnimation MoveAnimation = Resources["MoveAnimation"] as DoubleAnimation; MoveAnimation.To = state; Panels.BeginAnimation(Canvas.LeftProperty, MoveAnimation, HandoffBehavior.Compose); }
private void Next_MouseLeftButtonDown(object sender, MouseButtonEventArgs e) { if (state >= -376 * 5) { state -= 376; } else { Start start = new Start(); start.Show(); this.Close(); } DoubleAnimation MoveAnimation = Resources["MoveAnimation"] as DoubleAnimation; MoveAnimation.To = state; Panels.BeginAnimation(Canvas.LeftProperty, MoveAnimation, HandoffBehavior.Compose); }