title: Can I set a different property at the end of a Storyboard/Animation in WPF?
body: <p>I want to make an image flash a set number of times, when I set its Visibility to Visible.  And when it's finished flashing, I want it to make itself Collapsed again.</p>
  
  <p>Here's a simple version of what I'm trying to do:</p>
  
  <pre><code>&lt;Image Visibility="Collapsed"
         Margin="0,0,3,0"
         Width="24"
         Source="blah"
         Height="24"&gt;
    &lt;Image.Style&gt;
      &lt;Style TargetType="{x:Type Image}"&gt;
        &lt;Style.Triggers&gt;
          &lt;Trigger Property="Visibility"
                    Value="Visible"&gt;
            &lt;Trigger.EnterActions&gt;
              &lt;BeginStoryboard&gt;
                &lt;Storyboard RepeatBehavior="5x"
                            x:Name="flashingStoryboard"&gt;
                  &lt;DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="Opacity"
                                                  Duration="0:0:1"
                                                  FillBehavior="Stop"&gt;
                    &lt;DiscreteDoubleKeyFrame Value="0"
                                            KeyTime="0:0:0" /&gt;
                    &lt;DiscreteDoubleKeyFrame Value="1"
                                            KeyTime="0:0:0.5" /&gt;
                  &lt;/DoubleAnimationUsingKeyFrames&gt;
                &lt;/Storyboard&gt;
              &lt;/BeginStoryboard&gt;
            &lt;/Trigger.EnterActions&gt;
          &lt;/Trigger&gt;
        &lt;/Style.Triggers&gt;
      &lt;/Style&gt;
    &lt;/Image.Style&gt;
  &lt;/Image&gt;
  </code></pre>
  
  <p>Can I do this in XAML?</p>