title: Handle the close event via task bar
body: <p>I am developing a WPF application. I usually close applications via task bar. When we put the mouse on task bar, it will show a preview of the application. I will press the center mouse button on that preview, so the application will close.</p>
  
  <p>This scenario not working in WPF applications. It will send the application to background (GUI will exit, but application still run on background). The only option I have is to handle the <code>OnClosing()</code> event. Is there any other method?</p>
  
  <p><img src="https://i.stack.imgur.com/BW0F6.jpg" alt="Sample image"></p>