title: Binding to a DoubleAnimation's duration throws TargetInvocationException
body: <p>I have a WPF project using CM. I have a progress bar that I would like to animate smoothly. I have a storyboard containing a DoubleAnimation. The problem is that when I try to bind the Duration of the DoubleAnimation to a property on my view model, I get a TargetInvocationException on running the program.</p>
  
  <p>The XAML for the progress bar looks like this:</p>
  
  <pre class="lang-xml prettyprint-override"><code>&lt;ProgressBar Name="ProgressBar" Width="400" Height="18"&gt;
      &lt;ProgressBar.Style&gt;
          &lt;Style&gt;
              &lt;Style.Triggers&gt;
                  &lt;DataTrigger Binding="{Binding Path=IsMeasuring}" Value="True"&gt;
                      &lt;DataTrigger.EnterActions&gt;
                          &lt;BeginStoryboard&gt;
                              &lt;Storyboard&gt;
                                  &lt;DoubleAnimation 
                                      Storyboard.Target="{Binding TemplatedParent}" 
                                      Storyboard.TargetProperty="Value" 
                                      From="0" 
                                      To="100" 
                                      Duration="{Binding MeasurementDuration}" 
                                  /&gt;
                              &lt;/Storyboard&gt;
                          &lt;/BeginStoryboard&gt;
                      &lt;/DataTrigger.EnterActions&gt;
                  &lt;/DataTrigger&gt;
              &lt;/Style.Triggers&gt;
          &lt;/Style&gt;
      &lt;/ProgressBar.Style&gt;
  &lt;/ProgressBar&gt;
  </code></pre>
  
  <p>While the property in my view model looks like this:</p>
  
  <pre class="lang-cs prettyprint-override"><code>private Duration measurementDuration = new Duration(TimeSpan.FromSeconds(1));
  public Duration MeasurementDuration
  {
      get { return measurementDuration; }
      private set
      {
          measurementDuration = value;
          NotifyOfPropertyChange(() =&gt; MeasurementDuration);
      }
  } 
  </code></pre>
  
  <p>I feel that the answer is staring straight at me, but I simply cannot find it. Thanks in advance for any help.</p>