title: LayoutTransform animation on ScaleX and ScaleY is breaking binding with them
body: <p>I have a custom class say 'MyCanvas' derived from wpf Canvas class. MyCanvas has a Dependency Property 'Scale' which specify the scale transform for the canvas. Now when the value of Scale changes I want to animate the transform from old value to new value. for that I am using <code>LayoutTransform.BeginAnimation(...)</code> method.</p>
  
  <p>Code:</p>
  
  <pre><code>//This represents the time it will take to zoom
  Duration zoomDuration = new Duration(TimeSpan.Parse("0:0:0.3"));
  
  //Set up animation for zooming
  DoubleAnimationUsingKeyFrames scaleAnimation = new DoubleAnimationUsingKeyFrames();
  scaleAnimation.Duration = zoomDuration;
  scaleAnimation.KeyFrames = GetAnimationSplines(newScale);
  scaleAnimation.Completed += new EventHandler(
      (sender, e) =&gt; Scale = newScale);
  
  // Start the scale (zoom) animations
  LayoutTransform.BeginAnimation(ScaleTransform.ScaleXProperty, scaleAnimation);
  LayoutTransform.BeginAnimation(ScaleTransform.ScaleYProperty, scaleAnimation);
  </code></pre>
  
  <p>XMAL:</p>
  
  <pre><code>&lt;Grid&gt;
      &lt;ItemsControl x:Name="Items"&gt;
          &lt;ItemsControl.ItemsPanel&gt;
              &lt;ItemsPanelTemplate&gt;
                  &lt;local:MyCanvas Scale="{Binding Scale, Mode=TwoWay}"&gt;
                      &lt;local:MyCanvas.LayoutTransform UseLayoutRounding="True"&gt;
                          &lt;ScaleTransform ScaleX="{Binding Scale, Mode=TwoWay}" 
                                          ScaleY="{Binding Scale, Mode=TwoWay}"/&gt;
                      &lt;/local:MyCanvas.LayoutTransform&gt;
                   &lt;/local:MyCanvas&gt;
               &lt;/ItemsPanelTemplate&gt;
           &lt;/ItemsControl.ItemsPanel&gt;
      &lt;/ItemsControl&gt;
  &lt;/Grid&gt;
  </code></pre>
  
  <p>But after executing this code, the binding of <code>ScaleX</code> and <code>ScaleY</code> with <code>Scale</code> ( a property in viewmodel) is breaking i.e. changing value of <code>Scale</code> does not change scale on canvas.</p>
  
  <p>Error Message (using Snoop):</p>
  
  <p><code>System.Windows.Data Error: 2 : Cannot find governing FrameworkElement or FrameworkContentElement for target element. BindingExpression:Path=Scale; DataItem=null; target element is 'ScaleTransform' (HashCode=796423); target property is 'ScaleX' (type 'Double')</code></p>
  
  <p><code>System.Windows.Data Error: 2 : Cannot find governing FrameworkElement or FrameworkContentElement for target element. BindingExpression:Path=Scale; DataItem=null; target element is 'ScaleTransform' (HashCode=796423); target property is 'ScaleY' (type 'Double')</code></p>
  
  <p>Please let me know if any one has solution for this. Thanks</p>