AppShell Page Navigation using Absolute Route URI doesn't work on WinUI

dg2k 1,391 Reputation points
2022-10-11T15:45:33.833+00:00

I am experimenting with Page navigation using Absolute Route URI as defined below.

Routing.RegisterRoute("//MainPage/MoreMenuPage", typeof(MoreMenuPage));  
Routing.RegisterRoute("//MainPage/MoreMenuPage/AdminHomePage", typeof(AdminHomePage));  
Routing.RegisterRoute("//MainPage/MoreMenuPage/AdminHomePage/AdminDetailPage", typeof(AdminDetailPage));  

It works on Android without any issues. However, it fails for WinUI on the third route in the above. That is,

await Shell.Current.GoToAsync("//MainPage/MoreMenuPage/AdminHomePage/AdminDetailPage");  

throws an exception with navigation fail on WinUI. It works on Android.

What am I doing wrong that WinUI doesn't like?

.NET MAUI
.NET MAUI
A Microsoft open-source framework for building native device applications spanning mobile, tablet, and desktop.
3,231 questions
{count} votes