title: Fading out a wpf window on close
body: <p>I want to fade a window in/out in my application.<br/> 
  Fading in occurs on <code>Window.Loaded</code> and I wanted to fade out on close (<code>Window.Closed</code> or <code>Window.Closing</code>).
  Fading in works perfectly, but <code>Window.Closing</code> is not allowed value for <code>RoutedEvent</code> property.<br/>
  What <code>RoutedEvent</code> should I be using for Close?</p>
  
  <pre class="lang-xml prettyprint-override"><code>    &lt;Window.Triggers&gt;
          &lt;EventTrigger RoutedEvent="Window.Loaded"&gt;
              &lt;BeginStoryboard&gt;
                  &lt;Storyboard&gt;
                      &lt;DoubleAnimation Storyboard.TargetProperty="Opacity" From="0" To="1" Duration="0:0:2" FillBehavior="HoldEnd" /&gt;
                  &lt;/Storyboard&gt;
              &lt;/BeginStoryboard&gt;
          &lt;/EventTrigger&gt;
          &lt;EventTrigger RoutedEvent="Window.Closing"&gt;
              &lt;BeginStoryboard&gt;
                  &lt;Storyboard&gt;
                      &lt;DoubleAnimation Storyboard.TargetProperty="Opacity" From="1" To="0" Duration="0:0:2" FillBehavior="HoldEnd" /&gt;
                  &lt;/Storyboard&gt;
              &lt;/BeginStoryboard&gt;
          &lt;/EventTrigger&gt;
      &lt;/Window.Triggers&gt;
  </code></pre>
  
  <p>I get a error on , Value 'Window.Closing' cannot be assigned to property 'RoutedEvent'. Invalid event name.</p>