title: Animate a window, sliding from right to left or from bottom to top
body: <p>I am trying to implement an animation for a window such that it acts as sliding from the right to the left or from the bottom to the top.
  I've tried the DoubleAnimation, which works for the case from the left to the right or from the top to the bottom.
  Here is what I've tried:</p>
  
  <pre><code>myWindow.Show();
  DoubleAnimation myAnimation = new DoubleAnimation();
  myAnimation.From = 0;
  myAnimation.To = myWindow.ActualWidth;
  myAnimation.SpeedRatio = 5;
  myWindow.BeginAnimation(System.Windows.Window.WidthProperty, myAnimation);
  </code></pre>
  
  <p>If I replace <code>myWindow.ActualWidth</code> with <code>myWindow.ActualHeight</code>, and replace <code>WidthProperty</code> with <code>HeightProperty</code>, I will get the animation slides from top to bottom.</p>
  
  <p>Do you know any similar and simple way to animate the window but slide from the right to the left? <code>myWindow.Left</code> and <code>myWindow.Top</code> have already been set.
  Thank you so much for your help in advance. I really appreciate that.</p>