Manuel Abud
Manuel Abud

Reputation: 26

Xamarin Forms - How to do navigation without return

I have two pages: Page A and Page B. I want that the user on my application be able to pass since page A to page B, but I don,t want he to be able to pass since page B to page A. How can I do that?

I tryed to use Navigation Page and deactivate the return Button, but I couldn't find how deactivate it.

Upvotes: 0

Views: 519

Answers (1)

Alessandro Caliaro
Alessandro Caliaro

Reputation: 5768

If you don't need to "Navigate" you can set

Application.Current.MainPage = new PageB();

and override OnBackButtonPressed()

protected override void OnDisappearing()
{
       //back button logic here
       return true;
}

Upvotes: 2

Related Questions