FreshMvvm icon indicating copy to clipboard operation
FreshMvvm copied to clipboard

Clear Back Button Title

Open marcoseraphin opened this issue 8 years ago • 3 comments

Hi all,

I am trying to set an empty back button title so that in iOS (PCL based Xamarin Forms FreshMVVM based app) the back button is only the "<" character without any text.

I found this method:

NavigationPage.SetBackButtonTitle(this, "");

But it seems not to work with my FreshMVVM based app. Perhaps the own FreshMVVM navigation is overriding this setting or uses its own kind of navigation.

Any idea to clear the back button text with FreshMVVM ?

Best

Marco

marcoseraphin avatar Nov 28 '17 07:11 marcoseraphin

Has anyone managed to get this working?!... I really want to change the back button as my FreshTabbedFONavigationContainer title is quite long for a back button!

Even better would be to hide the back button all together and control from buttons. I tried doing it as a model but then I have iPhone X issues that I don't really want to fudge.

Any help or guidance much appreciated!

msivers avatar Feb 28 '18 01:02 msivers

Have a look at this post by James Montemagno. In XAML add the NavigationPage.BackButtonTitle to the ContentPage. Remember this is set on the page you want to navigate back to, not on the page currently displayed.

<ContentPage
    xmlns="http://xamarin.com/schemas/2014/forms" 
    xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" 
    xmlns:ios="clr-namespace:Xamarin.Forms.PlatformConfiguration.iOSSpecific;assembly=Xamarin.Forms.Core" 
    ios:Page.UseSafeArea="true"
    x:Class="MyProject.Pages.MyPage"
    NavigationPage.BackButtonTitle="Back"
    Title="My Page Title">
    ...
</ContentPage>

daveclarke avatar Aug 19 '18 23:08 daveclarke

https://newbedev.com/how-to-change-the-back-button-text-on-xamarin-forms

I tried this and works for me.

Cacata avatar Aug 24 '21 15:08 Cacata