Xamarin Forms-摆脱导航栏中的后退按钮 [英] Xamarin Forms - Getting Rid of Back Button In Nav Bar

查看:425
本文介绍了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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆