SOLVED
The problem was when I was navigating to Help Menu I was doing a Absolute navigation. I just change to Relative and it worked.
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
I have a HelpPage in my project that has a BackButton with this command on BaseViewModel:
DelegateCommand _goBack;
public DelegateCommand GoBack => _goBack
?? (_goBack = new DelegateCommand(async () => await ExecuteGoBack()));
private async Task ExecuteGoBack()
{
await NavigationService.GoBackAsync();
}
When I am in my MainScreen and navigate to the HelpPage this BackButton doesn't work anymore. There is no error accused, it goes throught the method and just don't do anything. Also I have tried to put a button in the HelpPage to Navigate to mainScreen instead of going back, and doesn't work either. This the the way that I first navigate to my MainScreen:
Device.BeginInvokeOnMainThread(async () =>
await NavigationService.NavigateAsync($"/{App.GetMainPageName()}"));
And in the App.cs:
public static string GetMainPageName()
{
Debug.WriteLine("App.cs: " + BluetoothModule.Instance.FirmwareVersion);
switch (BluetoothModule.Instance.FirmwareVersion)
{
case FirmwareVersions.V1:
return nameof(MainPageV1);
case FirmwareVersions.V2:
return nameof(MainPageV2V3);
case FirmwareVersions.V3:
return nameof(MainScreen);
case FirmwareVersions.V4:
return nameof(MainPageV2V3);
default:
return nameof(MainPageV2V3);
}
}
SOLVED
The problem was when I was navigating to Help Menu I was doing a Absolute navigation. I just change to Relative and it worked.