You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Apr 8, 2026. It is now read-only.
When a Page A navigates to Page B, Page B may determine in its InitializeAsync method, that the navigation is incorrect and should be cancelled.
This is currently not possible.
How should this be implemented
The easies option is to let Page B call INavigator.BackAsync. Should a navigation still be "in progress", that flow should be cancelled.
In our example, Page A's navigation to Page B is still in progress when Page B calls INavigator.BackAsync in it's InitializeAsync method.
In that case, the INavigator should simply navigate back to Page A
Why is this feature important?
Conditional Navigation: Pages can decide at runtime whether
they should be displayed based on user permissions, data
availability, or other conditions
User Experience: Prevents users from seeing pages that should
be redirected or cancelled
Navigation Chains: Supports complex navigation flows where
pages navigate to other pages that might cancel the entire
chain
What is missing?
When a Page A navigates to Page B, Page B may determine in its
InitializeAsyncmethod, that the navigation is incorrect and should be cancelled.This is currently not possible.
How should this be implemented
The easies option is to let Page B call
INavigator.BackAsync.Should a navigation still be "in progress", that flow should be cancelled.
In our example, Page A's navigation to Page B is still in progress when Page B calls
INavigator.BackAsyncin it'sInitializeAsyncmethod.In that case, the
INavigatorshould simply navigate back to Page AWhy is this feature important?
they should be displayed based on user permissions, data
availability, or other conditions
be redirected or cancelled
pages navigate to other pages that might cancel the entire
chain