I have a MVVM Xamarin Forms framework that I've written and I'm trying to establish how to override the BackButtonText for the Soft Navigate Back button (in iOS for the purposes of this question) when I popup a Modal Dialog.

My Navigation Service creates a custom modal page controller view model which in turn gets turned into a NavigationPage via an IoC container like so:

```
public async Task PushModalAsync<T>() where T : INavigationPageModel
    {
        var navigationmodel = _viewModelFactory.CreateModel<ModalPageControllerViewModel<T>>();
        var page = _viewFactory.CreatePage(navigationmodel);
        await Navigation.PushModalAsync(page);
    }

```

The resultant page ends up with the class structure:

```
public class NavigationControllerView : NavigationPage, IView

```

which then lets me set a BindingContext of my own ViewModel. After which I expect binding to do the rest of the heavy lifting for me. Setting the binding context on this navigation controller view Push's my first page (in this case the only page which is the modal dialog) onto the navigation stack.

```
var page = _viewFactory.CreatePage(_viewModel.CurrentPage);
PushAsync(page);

```

The page is then correctly displayed on my device as a popup page with my navigation bar displayed, and toolbar items on display as I'd expect. All bindings seem to be working as I'd imagined and I can dismiss the page from my ViewModel. All good so far.

Now (I'm guessing here) because the Modal Dialog is the only page on the modal stack and presumably because it is Modal, the 'Back' button does not appear for this Modal page. What I want to do is show the Back button on the modal popup and override its text so that it shows 'Cancel'. This should look the same as the 'Create new mail' popup page idea in iOS so I can dismiss it.

I have read quite a few articles that indicate it should be as 'simple as' placing the code 

```
NavigationPage.SetBackButtonText(page, "Some title") 

```

and perhaps even include the line

```
NavigationPage.SetHasBackButton(page, this)

```

But neglect to tell me exactly where this needs to happen. Some suggest that this should happen in the constructor of the page, but what page? Is it the page that is the NavigationPage itself (which as I understand it is a wrapper for the hosted modal page).

Note: I've hosted the Modal page within the NavigationPage in order to continue showing the navigation bar and toolbar items.

I've tried putting the NavigationPage.SetBackButtonText and NavigationPage.SetHasBackButton all over the place but none of them seem to do anything. 

Reading another article suggests that these methods only affect the 'next' page so I've tried applying the same methods to the previous page before it is shown but still to no success. But really we don't have a previous page as its the modal popup and the only thing on the stack.

Any ideas where I might be going wrong here?