title: Animate dependency properties
body: <p>I have a custom user control that registrates a dependency property <code>HoverHeight</code>:</p>
  
  <pre><code>public sealed partial class VirtualPointer : UserControl
  {
      public static readonly DependencyProperty HoverHeightProperty =
           DependencyProperty.Register("HoverHeight", typeof(double),
           typeof(VirtualPointer), new PropertyMetadata(1.0,OnHoverHeightChanged));
  
      public double HoverHeight
      {
          get { return (double)GetValue(HoverHeightProperty); }
          set { SetValue(HoverHeightProperty, value); }
      }
      ...
  </code></pre>
  
  <p>I use this property to calculate the <code>Margins</code> of some child controls in combination with an according <code>IValueConverter</code>.</p>
  
  <p>In a page that uses this control, I create a <code>Storyboard</code> which should animate the <code>HoverHeight</code> property:</p>
  
  <pre><code>&lt;Page ...&gt;
      &lt;Page.Resources&gt;
          &lt;Storyboard&gt;
              &lt;DoubleAnimationUsingKeyFrames Storyboard.TargetName="virtualPointer" Storyboard.TargetProperty="HoverHeight"&gt;
                  &lt;LinearDoubleKeyFrame Value="1.0" KeyTime="0:0:0"/&gt;
                  &lt;LinearDoubleKeyFrame Value="0.0" KeyTime="0:0:1"/&gt;
                  &lt;LinearDoubleKeyFrame Value="1.0" KeyTime="0:0:2"/&gt;
                  &lt;LinearDoubleKeyFrame Value="0.0" KeyTime="0:0:3"/&gt;
                  &lt;LinearDoubleKeyFrame Value="1.0" KeyTime="0:0:4"/&gt;
              &lt;/DoubleAnimationUsingKeyFrames&gt;
              &lt;!-- other DoubleAnimationUsingKeyFrames --&gt;
          &lt;/Storyboard&gt;
      &lt;/Page.Resources&gt;
      &lt;!-- ... --&gt;
      &lt;local:VirtualPointer Name="virtualPointer" HoverHeight="0.5"/&gt;    
  &lt;/Page&gt;
  </code></pre>
  
  <p>The storyboard contains other animations which work as expected. However, when I start the storyboard the <code>HoverHeight</code> value does not change. Neither the <code>OnHoverHeightChanged</code> handler is called, nor the converter with the new value. I can set a new value with the property setter which in turn calls the <code>OnHoverHeightChanged</code> handler, so there is probably a problem with the animation.</p>
  
  <p>There is no output or exception generated when starting the storyboard.</p>
  
  <p>Am I missing something here? How can I animate the custom dependency property?</p>