title: How to smooth WPF animation?
body: <p>I am struggling in smoothing WPF animation</p>
  
  <p>Actually my animation code is as follows:</p>
  
  <pre><code>private void AnimateX ( FrameworkElement element, double XMoveStart, double XMoveEnd, int secondX)
  {
  
      SineEase eEase = new SineEase();
      eEase.EasingMode = EasingMode.EaseInOut;
      Storyboard sb = new Storyboard();
  
      DoubleAnimation daX = new DoubleAnimation(XMoveStart, XMoveEnd, new Duration(new TimeSpan(0, 0, 0, secondX, 0)));
      daX.EasingFunction = eEase;
      Storyboard.SetTargetProperty(daX, new PropertyPath("(Canvas.Left)"));
  
      sb.Children.Add(daX);
  
      element.BeginStoryboard(sb);
  }
  </code></pre>
  
  <p>The above code is a method to move an object horizontally with sine ease. When only one object is moving, it is OK. However, whenever two or more objects move together (call AnimateX method on another object when the previous animation has not yet completed), the animation starts to become jittery. By jittery I mean, the objects are kind of shaking during the course of animation.</p>