title: How to remove a current page from stack navigation Xamarin Forms
body: <p>I'm trying so hard to do something but i wasnt able to solve this problem. I have three pages, One is the MainPage, LoginUpPage and SignUpPage, inside of LoginUpPage has a button who navigates to SignUpPage, what i want to do is when I finish my logic navigates to another page CreatedPage, whitch contains a Label with a Message - Success and then after 2 seconds GoBack to the LoginPage, the problem is if I press the backbutton from device it will return to the last page that has the label with a message and I don't want that. I have a toobar with a BackButton to return to each page that i navigates. So far I have this:</p>
  
  <p>LoginPage to SignUpPage :</p>
  
  <pre><code>Navigation.PushAsync(new SignupPage());
  </code></pre>
  
  <p>SignUpPage to CreatedPage :</p>
  
  <pre><code>await Navigation.PushModalAsync(new Created());
  </code></pre>
  
  <p>And inside of CreatedPage in my Contructor, this Method :</p>
  
  <pre><code>    public async void Redirect()
      {
          await Task.Delay(TimeSpan.FromSeconds(2));
          await Navigation.PushAsync(new LoginPage());
      }
  </code></pre>
  
  <p>I know by this <a href="https://stackoverflow.com/questions/25165106/how-do-you-switch-pages-in-xamarin-forms">question</a> there's basically three ways to navigate to another page :</p>
  
  <pre><code>Navigation.PushAsync(new OtherPage()); // to show OtherPage and be able to go back
  </code></pre>
  
  <p><code>Navigation.PushAsyncModal(new AnotherPage());// to show AnotherPage and not have a Back button</code></p>
  
  <p><code>Navigation.PopAsync();// to go back one step on the navigation stack</code></p>
  
  <p>At the same question has a example how to remove from a page from stack but it doesn't work.</p>
  
  <pre><code>item.Tapped += async (sender, e) =&gt; {
  await Navigation.PushAsync (new SecondPage ());
  Navigation.RemovePage(this);
  </code></pre>
  
  <p>};</p>