title: Xamarin.Forms Cannot call OnDisappearing()
body: <p>I need to just show a message (Under certain circumstance) when I'm leaving a screen.
  Found that there's a method called OnDisappearing() that is called when the form is being unloaded (Or also being overlaped by a new one).</p>
  
  <p>What I found: 
  <a href="https://forums.xamarin.com/discussion/89563/intercept-page-leaving-event" rel="nofollow noreferrer">https://forums.xamarin.com/discussion/89563/intercept-page-leaving-event</a>
  <a href="https://docs.microsoft.com/en-us/dotnet/api/xamarin.forms.page.ondisappearing?view=xamarin-forms" rel="nofollow noreferrer">https://docs.microsoft.com/en-us/dotnet/api/xamarin.forms.page.ondisappearing?view=xamarin-forms</a></p>
  
  <p>Issue is that if I just copy the code as it is I get an error cause of the override (<code>no suitable method found to override</code>) that won't let me leave the code as is:</p>
  
  <p><a href="https://i.stack.imgur.com/A97Qs.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/A97Qs.png" alt="enter image description here"></a></p>
  
  <p>*Same happens with <code>OnBackButtonPressed()</code></p>
  
  <p>Modified it and just left it without the override and it just won't be called by any mean..</p>
  
  <pre><code>protected void OnDisappearing()
  {
      Exiting();
  }
  
  private async void Exiting()
  {
      System.Threading.Tasks.Task tmpShouldExit = Application.Current.MainPage.DisplayAlert("Hello", "Hi", "OK");
  }
  </code></pre>
  
  <p>Is something I'm missing?
  Is there any other method I can use? </p>
  
  <p>Thanks</p>