如何在Xamarin.Forms上更改后退按钮文本 [英] How to change the Back Button Text on Xamarin.Forms

查看:104
本文介绍了如何在Xamarin.Forms上更改后退按钮文本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在尝试更改Xamarin.Forms中后退"按钮的文本,但是没有运气.

I have been trying to change the text of the back button in Xamarin.Forms without luck.

我已经很幸运地尝试了这段代码:

I tried already this code with no luck:

NavigationPage.SetBackButtonTitle(this, "");

我正在使用MasterDetailPage.

我试图将代码添加到XAML cs文件的构造函数中.

I tried to add the code into the constructor of the XAML cs file.

使用的库:PRISM 6.2.0,Xamarin Forms 2.3.1.114

Libraries used: PRISM 6.2.0, Xamarin Forms 2.3.1.114

有什么建议或想法吗?

预先感谢

推荐答案

您必须将上一页的Backbutton标题设置为string.Empty.默认情况下,它是导航堆栈上一页的标题,显示为后退按钮文本.

You have to set the Backbutton title of your previous page as string.Empty. By default it's the title of the previous page on the navigation stack that is shown as the back button text.

Android也不支持此属性.

Also Android does not support this property.

这篇关于如何在Xamarin.Forms上更改后退按钮文本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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