Quantcast
Channel: Recent Threads — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 204402

NavigationPage, PushModalAsync and back button

$
0
0

Its a Xamarin Forms app that I'm testing in android.

I have a tabbed page with a list item, when user clicks in list item I show a modal new page. Shomething like

private void NewsListView_ItemSelected(object sender, SelectedItemChangedEventArgs e)
{
var navigationPage = new NavigationPage(new NewsDetailPage());
Navigation.PushModalAsync(navigationPage,true);
}

I need to use PushModalAsync because if I use pushAsync it shows me the tabs in new page. Everything works well but it doesnt show back button in the navigation bar and I need it to come back. If I press back button in bottombar it works well.
I have tried several things: NavigationPage.SetHasBackButton, NavigationPage.SetHasNavigationBar...but they doestn works. How I can show the back button?

I dont know if I need to create a toolbaritem...in this case Do I need add the image of the left arrow etc or are there a predefinied item for that?

Thanks


Viewing all articles
Browse latest Browse all 204402

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>