title: Why a custom dependency property is not animated by a DoubleAnimation?
body: <p>I have the following WPF window:</p>
  
  <pre><code>&lt;Window x:Class="AnimationTest.MainWindow"
      x:Name="main"
  
      xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
      xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
      Title="MainWindow" Height="350" Width="525" &gt;
  
  &lt;Window.Resources&gt;
      &lt;Storyboard RepeatBehavior="Forever" x:Key="animationStoryboard" TargetName="main" TargetProperty="CurrentOffset" &gt;
          &lt;DoubleAnimation From="0" To="100" Duration="0:0:5"  SpeedRatio=".8" AutoReverse="True" /&gt;
      &lt;/Storyboard&gt;
  &lt;/Window.Resources&gt;
  
  &lt;Grid&gt;
  
  &lt;/Grid&gt;
  &lt;/Window&gt;
  </code></pre>
  
  <p>With the following code behind:</p>
  
  <pre><code>using System.Windows;
  using System.Windows.Media.Animation;
  
  namespace AnimationTest
  {
  public partial class MainWindow : Window
  {
      public static DependencyProperty CurrentOffsetProperty = DependencyProperty.Register("CurrentOffset", typeof(double), typeof(MainWindow), new FrameworkPropertyMetadata(OnCurrentOffsetPropertyChanged));
  
      private static void OnCurrentOffsetPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
      {
          MainWindow control = (MainWindow)d;
      }
  
      public double CurrentOffset
      {
          get
          {
              return (double)base.GetValue(MainWindow.CurrentOffsetProperty);
          }
          set
          {
              MessageBox.Show("Hit");
              base.SetValue(MainWindow.CurrentOffsetProperty, value);
          }
      }
  
      public MainWindow()
      {
          InitializeComponent();
  
          ((Storyboard)base.FindResource("animationStoryboard")).Begin(this);
      }
  }
  }
  </code></pre>
  
  <p>I expected to have the CurrentOffset property continuosly called but nothing happens. It's like the animation won't start. Anyone can point me where am I wrong?</p>
  
  <p>Thanks in advance.</p>