title: Animating drop shadow fade-in/fade-out with a storyboard
body: <p>I'd like to fade in a drop shadow effect on a DataGrid over 2 seconds, which fades out over 2 seconds again after the fade-in animation is completed.</p>
  
  <p>My code so far:</p>
  
  <pre><code>DropShadowEffect dropShadowEffect = new DropShadowEffect();
  dropShadowEffect.ShadowDepth = 0;
  dropShadowEffect.Color = Colors.LightSeaGreen;
  dropShadowEffect.Opacity = 0;
  dropShadowEffect.BlurRadius = 20;
  element.Effect = dropShadowEffect;
  
  Storyboard storyboard1 = new Storyboard();
  TimeSpan duration1 = TimeSpan.FromMilliseconds(2000);
  
  DoubleAnimation animateOpacity1 = new DoubleAnimation() { From = 0, To = 1, Duration = new Duration(duration1) };
  Storyboard.SetTargetName(animateOpacity1, element.Name);
  Storyboard.SetTargetProperty(animateOpacity1, new PropertyPath(DropShadowEffect.OpacityProperty));
  
  DoubleAnimation animateOpacity2 = new DoubleAnimation() { From = 1, To = 0, Duration = new Duration(duration1) };
  Storyboard.SetTargetName(animateOpacity2, element.Name);
  Storyboard.SetTargetProperty(animateOpacity2, new PropertyPath(DropShadowEffect.OpacityProperty));
  
  storyboard1.Children.Add(animateOpacity1);
  storyboard1.Children.Add(animateOpacity2);
  
  storyboard1.Begin(element);
  </code></pre>
  
  <p>Upon executing the code, nothing happens.</p>