title: How to represent "loading" in a GUI
body: <p>My application takes almost 4 seconds to completely shut down after the user confirms the shutting down. I am trying to show some activity and maybe a progress to the user within those 3 seconds. So the scenario would be something similar to</p>
  
  <blockquote>
    <p>ButtonClose_Click() -> Are you sure you want to exit? -> Yes ->
    "Closing"</p>
  </blockquote>
  
  <p>I tried to just display a window (messagebox) but I am using DevExpress windows and they are either <code>OkCancel</code>, <code>Ok</code>, <code>YesNo</code> and <code>YesNoCancel</code> so basically it needs a user input to continue:</p>
  
  <pre><code>Application.Current.Dispatcher.Invoke(
      () =&gt;
      {
          DXMessageBox.Show(Application.Current.MainWindow,
          "Text Here..", "Title Here.. ", MessageBoxButton.OKCancel, MessageBoxImage.Information); // Ok by Default
      });
  </code></pre>
  
  <p>This is what I have: </p>
  
  <pre><code>var result = DXMessageBox.Show(Application.Current.MainWindow,
      "Are you sure you want to EXIT the application?",
      "Attention", MessageBoxButton.OKCancel, MessageBoxImage.);
  
  if (result == MessageBoxResult.OK)
  {
      //         
      // I want to show or display some "loading" activity here till the below code finishes executing"
      // 
  
      mainViewModel.SaveDatabase(); // save database+
      mainViewModel.CaptureViewModel.cameraController.TurnCameraLights(false, false, false); // turn off some lights
      mainViewModel.CaptureViewModel.Uninitialize(); // clear stuff
      Environment.Exit(0);
  }
  </code></pre>
  
  <p>How could I approach that?</p>