title: Storyboard animation not completing when triggering property changes
body: <p>I am using WPF and MVVM. I have a storyboard with a color animation triggering on some state in the ViewModel. If in the "Increased" state the storyboard will cause the item to flash green once. If in the "Decreased" state the storyboard will flash red once. If in the "Unchanged" state nothing will happen.</p>
  
  <p>The problem I am having is if for any reason the state changes while the animation is running the animation will stop. E.g. I enter the the Increased state and the animation begins to flash green. Then the same property changes to Unchanged and the animation ceases immediately without ending. </p>
  
  <p><strong>Is there a way to have the animation run its course even though the value on which it is triggering has changed?</strong> </p>
  
  <pre><code>&lt;Storyboard x:Key="ValueIncreasedStoryboard" AutoReverse="True"&gt;
      &lt;ColorAnimation
          Storyboard.TargetProperty="(Border.Background).(SolidColorBrush.Color)"
          To="{StaticResource ResourceKey=IncreasedColor}"
          Duration="0:0:0.4" /&gt;
      &lt;ColorAnimation
          Storyboard.TargetProperty="(Border.BorderBrush).(SolidColorBrush.Color)"
          To="{StaticResource ResourceKey=IncreasedColor}"
          Duration="0:0:1" /&gt;
  &lt;/Storyboard&gt;
  
  &lt;DataTrigger Binding="{Binding Path=Status}" Value="{x:Static ViewModel:Status.Increased}"&gt;
      &lt;DataTrigger.EnterActions&gt;
          &lt;BeginStoryboard Storyboard="{StaticResource ValueIncreasedStoryboard}" x:Name="ValueIncreased_Storyboard"/&gt;
      &lt;/DataTrigger.EnterActions&gt;
      &lt;DataTrigger.ExitActions&gt;
          &lt;RemoveStoryboard BeginStoryboardName="ValueIncreased_Storyboard"/&gt;
      &lt;/DataTrigger.ExitActions&gt;
  &lt;/DataTrigger&gt;
  </code></pre>
  
  <p><strong>SOLUTION:
  A combination of deleting the exit action and setting the fill behavior to Stop.</strong></p>