title: Stop / start storyboard animation based on Visibility
body: <p>I have an animation that currently starts when a <code>Control</code> is loaded (the animation is essentially a waiting spinner, that is applied to an empty <code>ContentControl</code>).</p>
  
  <p>The animation however will constantly spin taking up resources.  What I'd like is for the animation to start / stop based on whether the animation control is visible or not, is this possible?</p>
  
  <pre><code>&lt;Canvas.Triggers&gt;
      &lt;EventTrigger RoutedEvent="ContentControl.Loaded"&gt;
          &lt;BeginStoryboard&gt;
              &lt;Storyboard&gt;
                  &lt;DoubleAnimation
                  Storyboard.TargetName="SpinnerRotate"
                  Storyboard.TargetProperty="Angle"
                  From="0" To="360" Duration="0:0:01.3"
                  RepeatBehavior="Forever" /&gt;
              &lt;/Storyboard&gt;
          &lt;/BeginStoryboard&gt;
      &lt;/EventTrigger&gt;
  &lt;/Canvas.Triggers&gt;
  </code></pre>
  
  <p>I must have this working for both Silverlight and WPF.</p>