如何在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.