Xamarin Forms-摆脱导航栏中的后退按钮
问题描述:
让我们说应用程序的第一页是登录页面,然后我需要执行主菜单屏幕,有没有办法摆脱主菜单导航栏中的后退"按钮,比如摆脱登录页面堆栈?
Lets say the first page in the app is the login page and then it takes me to do the main menu screen, is there a way to get rid of the back button in the main menu navigation bar, like get rid of the login page stack?
谢谢
答
在Xamarin.Forms 1.3及更高版本中,您可以使用
In Xamarin.Forms 1.3 and greater you can use
NavigationPage.SetHasBackButton(this, false);
在Xaml
中,您可以添加:
<ContentPage ....NameSpaces etc....
NavigationPage.HasBackButton="False"
Title="MyPage">
</ContentPage>