Hello,
Welcome to our Microsoft Q&A platform!
I tried your code, the issue is about MyCoffeeDetailsPage.xml
, you can bind a ViewModel.
<ContentPage.BindingContext>
<!--you can bind a ViewModel instead of view -->
<views:MyCoffeeDetailsPage/>
</ContentPage.BindingContext>
I create a new page and find the route you used is right.
public AppShell()
{
InitializeComponent();
Routing.RegisterRoute(nameof(MyCoffeeDetailsPage), typeof(MyCoffeeDetailsPage));
Routing.RegisterRoute(nameof(CoffeeEquipmentPage), typeof(CoffeeEquipmentPage));
Routing.RegisterRoute(nameof(MyNewPage1), typeof(MyNewPage1));
}
async Task Travel ()
{
var route = $"{nameof(MyNewPage1)}";
await Shell.Current.GoToAsync(route);
}
Best Regards,
Wenyan Zhang
If the response is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.
Sure, here it is
https://github.com/MrZabbah/FirstProjectXamarin.git