title: GetLeft() returns 0 after animation moves the panel ouside the window
body: <p>I'm still learning wpf, so I'm a little confused here.
  The code animate a StackPanel over the left side of the window on the clink of a button, and then in the original position clicking on another button.
  It works but if you click two time on show or hide, it moves the panel and then perform the animation even if it's not necessary (the code is more clear than me).
  I'v tried to intercept the actual position of the panel to stop the animation if necessary, but the property GetLeft() always returns 0.</p>
  
  <p>The xaml</p>
  
  <pre><code>        &lt;Canvas&gt;
              &lt;StackPanel x:Name="pannello_laterale" Width="100" Panel.ZIndex="10" Canvas.Left="0" Canvas.Top="0" Canvas.Bottom="0" Background="Azure"&gt;
                  &lt;Button&gt;
                      &lt;StackPanel&gt;
                          &lt;Label&gt;bim&lt;/Label&gt;
                          &lt;Label&gt;bum&lt;/Label&gt;
                      &lt;/StackPanel&gt;
                  &lt;/Button&gt;
                  &lt;Button&gt;bam&lt;/Button&gt;
              &lt;/StackPanel&gt;
  
              &lt;Button x:Name="Mostra" Content="Show" Canvas.Left="201" Canvas.Top="56" Width="75" Click="Mostra_Click"/&gt;
              &lt;Button x:Name="Nascondi" Content="Hide" Canvas.Left="201" Canvas.Top="107" Width="75" Click="Nascondi_Click"/&gt;
          &lt;/Canvas&gt;
  </code></pre>
  
  <p>The code</p>
  
  <pre><code>        using System;
          using System.Collections.Generic;
          using System.Linq;
          using System.Text;
          using System.Threading.Tasks;
          using System.Windows;
          using System.Windows.Controls;
          using System.Windows.Data;
          using System.Windows.Documents;
          using System.Windows.Input;
          using System.Windows.Media;
          using System.Windows.Media.Imaging;
          using System.Windows.Navigation;
          using System.Windows.Shapes;
  
          using System.Windows.Media.Animation;
  
      namespace Prova_WPF2
      {
          /// &lt;summary&gt;
          /// Logica di interazione per MainWindow.xaml
          /// &lt;/summary&gt;
          public partial class MainWindow : Window
          {
              public MainWindow()
              {
                  InitializeComponent();
              }
  
              private void Mostra_Click(object sender, RoutedEventArgs e)
              {
                  posizione.MoveXTo(pannello_laterale, -100.00, 0.00, 0.3);
              }
  
              private void Nascondi_Click(object sender, RoutedEventArgs e)
              {
                  posizione.MoveXTo(pannello_laterale, 0.00, -100.00, 0.3);
              }
  
          }
  
          public static class posizione
          {
  
              public static void MoveXTo(this StackPanel target, double FromX, double ToX, double Time)
              {
                  var left = Canvas.GetLeft(target);
                  //MessageBox.Show(left.ToString());
                  TranslateTransform transformation = new TranslateTransform();
                  target.RenderTransform = transformation;
                  DoubleAnimation animation = new DoubleAnimation(FromX, ToX, TimeSpan.FromSeconds(Time));
                  transformation.BeginAnimation(TranslateTransform.XProperty, animation);
              }
          }
      }
  </code></pre>