title: UWP _isInBackgroundMode
body: <p>I am having a problem with my code.</p>
  
  <p>Says the value is set, but not used...</p>
  
  <p>I get the nice green line under bool _isInBackgroundMode = false;</p>
  
  <p>What am I not getting here?</p>
  
  <pre><code>namespace MyApp
  {
  using Views;
  using Windows.UI;
  using Windows.UI.ViewManagement;
  
  sealed partial class App : Application
  {
      bool _isInBackgroundMode = false;
  
      public App()
      {
          this.InitializeComponent();
          this.Suspending += OnSuspending;
  
          this.EnteredBackground += App_EnteredBackground;
          this.LeavingBackground += App_LeavingBackground;
  
      }
  
      private void App_EnteredBackground(object sender, EnteredBackgroundEventArgs e)
      {
          _isInBackgroundMode = true;
      }
  
      private void App_LeavingBackground(object sender, LeavingBackgroundEventArgs e)
      {
          _isInBackgroundMode = false;
      }
  </code></pre>