title: How to overide HardwareButtons_BackPressed of Basic Page in windows phone 8.1
body: <p>I have two pages in my app.One is blankPage and other is basic page. On basic page I want to provide a message if a user press back button like 
  "Are you sure you want to quit" .If Yes then go back else remain there , this working fine by using this code</p>
  
  <pre><code> HardwareButtons.BackPressed += HardwareButtons_BackPressed;
  private async void HardwareButtons_BackPressed(object sender, BackPressedEventArgs e)
          {
              e.Handled = true;
              MessageDialog dlg = new MessageDialog("Are you sure you want to quit you will loose all your work ?", "Warning");
              dlg.Commands.Add(new UICommand("Yes", new UICommandInvokedHandler(CommandHandler1)));
              dlg.Commands.Add(new UICommand("No", new UICommandInvokedHandler(CommandHandler1)));
  
  
  
  
              await dlg.ShowAsync();
      }
  
  
  
   private void CommandHandler1(IUICommand command)
          {
              var label = command.Label;
              switch (label)
              {
                  case "Yes":
                      {
                          this.Frame.Navigate(typeof(MainPage));
                          break;
                      }
                  case "No":
                      {
                          break;
                      }
  
              }
  
          }
  </code></pre>
  
  <p>But when I am pressing back button on my BlankPage this message also appears there and also appearing in all other basic page if I add more . What mistake am I doing??</p>