Routing
In .NET MAUI, you register your routes in AppShell.xaml.cs
. For example, to connect the buddydetailspage
string to the actual BuddyDetailsPage,
you would add this:
Routing.RegisterRoute("buddydetailspage", typeof(BuddyDetailsPage));
We’ll create a routing entry for all of the pages, including the ones we can access through tabs. This will give us the greatest flexibility:
public partial class AppShell : Shell { public AppShell() { InitializeComponent(); Routing.RegisterRoute("buddiespage", typeof(BuddiesPage)); Routing.RegisterRoute("buddydetailspage", typeof(BuddyDetailsPage)); Routing.RegisterRoute("aboutpage", typeof(AboutPage)); Routing.RegisterRoute("preferencespage", ...