title: C# WPF TextBlock Visibility doesn't change after StoryBoard
body: <p>I have a WPF application with a button, that when clicked executes a function that turns the visible property of   a TextBlock to Visible:</p>
  
  <pre><code>        savetxt.Visibility = Visibility.Visible;
          System.Windows.MessageBox.Show(savetxt.Visibility.ToString());
  </code></pre>
  
  <p>txt.Visibility.ToString());
  When the TextBlock turns visible, a storyboard that makes it fade in and out starts:</p>
  
  <pre><code>&lt;TextBlock x:Name="savetxt" Visibility="Hidden" Text="Hello"&gt;
      &lt;TextBlock.Style&gt;
          &lt;Style TargetType="TextBlock"&gt;
              &lt;Style.Triggers&gt;
                  &lt;Trigger Property="Visibility" Value="Visible"&gt;
                      &lt;Trigger.EnterActions&gt;
                          &lt;BeginStoryboard&gt;
                              &lt;Storyboard&gt;
                                  &lt;ObjectAnimationUsingKeyFrames BeginTime="0:0:0" Storyboard.TargetProperty="Visibility"&gt;
                                      &lt;DiscreteObjectKeyFrame KeyTime="0"&gt;
                                          &lt;DiscreteObjectKeyFrame.Value&gt;
                                              &lt;Visibility&gt;Visible&lt;/Visibility&gt;
                                          &lt;/DiscreteObjectKeyFrame.Value&gt;
                                      &lt;/DiscreteObjectKeyFrame&gt;
                                  &lt;/ObjectAnimationUsingKeyFrames&gt;
                                  &lt;DoubleAnimation BeginTime="0:0:0.0" Storyboard.TargetProperty="Opacity" From="0" To="1" Duration="0:0:0.2"/&gt;
                                  &lt;DoubleAnimation BeginTime="0:0:5.0" Storyboard.TargetProperty="Opacity" From="1" To="0" Duration="0:0:0.5"/&gt;
                                  &lt;ObjectAnimationUsingKeyFrames BeginTime="0:0:5.5" Storyboard.TargetProperty="Visibility"&gt;
                                      &lt;DiscreteObjectKeyFrame KeyTime="0"&gt;
                                          &lt;DiscreteObjectKeyFrame.Value&gt;
                                              &lt;Visibility&gt;Hidden&lt;/Visibility&gt;
                                          &lt;/DiscreteObjectKeyFrame.Value&gt;
                                      &lt;/DiscreteObjectKeyFrame&gt;
                                  &lt;/ObjectAnimationUsingKeyFrames&gt;
                              &lt;/Storyboard&gt;
                          &lt;/BeginStoryboard&gt;
                      &lt;/Trigger.EnterActions&gt;
                  &lt;/Trigger&gt;
              &lt;/Style.Triggers&gt;
          &lt;/Style&gt;
      &lt;/TextBlock.Style&gt;
  &lt;/TextBlock&gt;
  </code></pre>
  
  <p>The first time I press the button, MessageBox.Show shows Visible, and the storyboard starts animating successfully. However, when I press the button the second time, MessageBox.Show shows Hidden and nothing else happens.
  could anyone help me figure out why savetxt.Visibility = Visibility.Visible; doesn't change the visibility after the first time?</p>