Xamarin Forms - 去掉导航栏中的后退按钮 [英] Xamarin Forms - Getting Rid of Back Button In Nav Bar
本文介绍了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>
这篇关于Xamarin Forms - 去掉导航栏中的后退按钮的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文