Intro

I came across a scenario in which my app exposed multiple methods for navigating to a particular page.

Method 1: XAML

One exposed method was from the app menu in which the navigation was implemented in XAML:

XAML

Method 2: Code-behind of  Initial page

Another exposed method was to perform navigation from another page’s code-behind:

Programmatic_shell_navigation

Method 3: Code-behind of Target page

Unfortunately, there was no current way to specify navigation arguments in XAML even though the navigation mapping was defined in XAML.

Thus, I had to override the target page’s OnAppearing method to handle post-navigation details (i.e. arguments):

Codebehind