title: How to remain visible for 1 second and then go back to Hidden in visibility in wpf?
body: <p>I have a style for ScrollBar. 
  The track in ScrollBar have Visibility Hidden by default.
  It change to Visible if either: 
   - the mouse is over the scroll bar
   - or, the user is currently scrolling using the scroll wheel
  Once the condition for visibility is not fulfilled anymore, How to remain the track is visible for 1 second and then go back to Hidden ?</p>
  
  <p>Thanks!</p>
  
  <pre><code> &lt;ControlTemplate x:Key="VerticalScrollBarTemplate" TargetType="{x:Type ScrollBar}"&gt;
      &lt;Grid Width="15"&gt;
          &lt;Border Opacity="0.7"/&gt;
          &lt;Track x:Name="PART_Track" 
              Width="12"
              MinHeight="20"
              Height="Auto"
              Margin="2"
              IsDirectionReversed="true" &gt;
              &lt;Track.DecreaseRepeatButton&gt;
                  &lt;RepeatButton Style="{StaticResource ScrollBackgroundStyle}" Command="ScrollBar.LineUpCommand"  /&gt;
              &lt;/Track.DecreaseRepeatButton&gt;
              &lt;Track.IncreaseRepeatButton&gt;
                  &lt;RepeatButton Style="{StaticResource ScrollBackgroundStyle}" Command="ScrollBar.LineDownCommand" /&gt;
              &lt;/Track.IncreaseRepeatButton&gt;
              &lt;Track.Thumb&gt;
                  &lt;Thumb Name="Thumb" Visibility="Hidden" Style="{StaticResource ScrollBarThumbStyle}" /&gt;
              &lt;/Track.Thumb&gt;
          &lt;/Track&gt;
      &lt;/Grid&gt;
      &lt;ControlTemplate.Triggers&gt;
          &lt;Trigger Property="IsMouseOver" Value="true"&gt;
              &lt;Setter TargetName="Thumb" Property="Visibility" Value="Visible"/&gt;                
          &lt;/Trigger&gt;
      &lt;/ControlTemplate.Triggers&gt;
  &lt;/ControlTemplate&gt;
  </code></pre>
  
  <p>I try use:</p>
  
  <pre><code> &lt;Storyboard x:Key="FadeInStoryboard"&gt;
      &lt;DoubleAnimation Storyboard.TargetName="Thumb" 
               Storyboard.TargetProperty="Opacity"
               From="0" To="1"  Duration="0:0:0.5"/&gt;
  &lt;/Storyboard&gt;
  &lt;Storyboard x:Key="FadeOutStoryboard" BeginTime="0:0:1"&gt;
          &lt;DoubleAnimation Storyboard.TargetName="Thumb"
                   Storyboard.TargetProperty="Opacity"
                   From="1" To="0"  Duration="0:0:0.5" /&gt;
      &lt;/Storyboard&gt;
  
  &lt;Trigger Property="IsMouseOver" Value="true"&gt;
                  &lt;Setter TargetName="Thumb" Property="Visibility" Value="Visible"/&gt;
                  &lt;Trigger.EnterActions&gt;
                      &lt;BeginStoryboard Storyboard="{StaticResource FadeInStoryboard}" /&gt;
                  &lt;/Trigger.EnterActions&gt;
                  &lt;Trigger.ExitActions&gt;&lt;
                      &lt;BeginStoryboard Storyboard="{StaticResource FadeOutStoryboard}" /&gt;
                  &lt;/Trigger.ExitActions&gt;
              &lt;/Trigger&gt;
  </code></pre>
  
  <p>But that not remain the track is visible for 1 second and then go back to Hidden unless I set the track in ScrollBar have Visibility Visible by default.
  Thanks!</p>