title: WPF Binding to RotateTransform.Angle does not work
body: <p>I am trying to make a simple app where I bounce an image around the screen and rotate it.  I want the rotation speed to be dynamic and change whenever the image hits one of the sides of the containing window.  So, I was trying to figure out how to dynamically change the speed of the rotation and perhaps even the direction.  I am experimenting with passing in a speed value and dynamically changing the rotation with an animation.</p>
  
  <p>Anyway, I am trying to just test the ability to dynamically change the rotation by animating the AngleProperty and binding to the Angle in the XAML.  I must be doing something wrong, because the image won't rotate.</p>
  
  <p>Any help with this would be GREATLY appreciated !!</p>
  
  <p>Thanks,
  Curtis</p>
  
  <p>Here is my XAML:</p>
  
  <pre><code>&lt;UserControl x:Class="Scooter.Bug"
               xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
               xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
               xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
               xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
               mc:Ignorable="d" 
               DataContext="{Binding RelativeSource={RelativeSource Self}}"
               Loaded="Bug_OnLoaded"
               d:DesignHeight="300" d:DesignWidth="300"&gt;
      &lt;Grid&gt;
          &lt;Image x:Name="_image" Source="Images/Author.png" RenderTransformOrigin="0.5, 0.5"&gt;
          &lt;Image.RenderTransform&gt;
              &lt;RotateTransform Angle="{Binding Angle}"/&gt;
          &lt;/Image.RenderTransform&gt;    
          &lt;/Image&gt;
      &lt;/Grid&gt;
  &lt;/UserControl&gt;
  </code></pre>
  
  <p>Here is my code-behind:</p>
  
  <pre><code>using System;
  using System.Windows;
  using System.Windows.Media.Animation;
  
  namespace Scooter
  {
      public partial class Bug
      {
          public static readonly DependencyProperty SpinSpeedProperty = DependencyProperty.Register("SpinSpeed", typeof (TimeSpan), typeof (Bug), new PropertyMetadata(default(TimeSpan)));
          public static readonly DependencyProperty AngleProperty = DependencyProperty.Register("Angle", typeof (double), typeof (Bug), new PropertyMetadata(default(double)));
  
          public Bug()
          {
              InitializeComponent();
          }
  
          void _timer_Tick(object sender, EventArgs e)
          {
              Angle = Angle &gt;= 360 ? 0 : Angle + 1;
          }
  
          public TimeSpan SpinSpeed
          {
              get { return (TimeSpan) GetValue(SpinSpeedProperty); }
              set { SetValue(SpinSpeedProperty, value); }
          }
  
          public double Angle
          {
              get { return (double) GetValue(AngleProperty); }
              set { SetValue(AngleProperty, value); }
          }
  
          private void Bug_OnLoaded(object sender, RoutedEventArgs e)
          {
              DoubleAnimation animation = new DoubleAnimation
              {
                  From = 0,
                  To = 360,
                  RepeatBehavior = RepeatBehavior.Forever,
                  Duration = SpinSpeed
              };
  
              _image.BeginAnimation(AngleProperty, animation);
          }
      }
  }
  </code></pre>