1
I have a Hamburguer Menu with a Listview where in the click of the listview line I call this method to open a Modal, but the Navigationbar does not appear the Backbutton.
public async Task OpenModalAsync(Page poPage, bool bNavigationPage = true)
{
if (bNavigationPage)
await Application.Current.MainPage.Navigation.PushModalAsync(new NavigationPage(poPage), true);
else
await Application.Current.MainPage.Navigation.PushModalAsync(poPage, true);
}
I have tried to use the method, but without result
NavigationPage.SetHasBackButton(this, true);
I found that in the Pushasync method it puts the Backbutton.
In Xamarinforms, navigation has two stacks:a for normal (pages added with the
PushAsync) and the modal stack (pages added withPushModalAsync). When you add more than one modal page the 'back' button still does not appear?– Diego Rafael Souza
@Diegorafaelsouza I did the test here and opening two modals does not appear the Backbutton, I think for modal should not even have.
– Lucas Riechelmann Ramos
Actually has yes, I tested before posting. It must be some page parameterization then. Only with this code is it hard to tell what’s going on, but surely what you want is possible.
– Diego Rafael Souza
@Diegorafaelsouza, thank you, I will test here to see what can be.
– Lucas Riechelmann Ramos