Skip to content

Navigation RemovePageInstruction not working correctly #3047

@lucacivale

Description

@lucacivale

Description

If I have the navigation stack MainPage/PageA/PageB/PageC and want to go back to MainPage without popping each page I should use Prisms RemovePageInstruction and do a navigation on PageC like NavigateAsync("../../../"). This worked in Xamarin but it's currently broken. For reference see also #2818.

If you navigate with NavigateAsync("../../../") the app won't navigate and remains in a broken state.

If you instead do NavigateAsync("../../../PageA") the navigation works as expected and the new navigation stack is MainPage/PageA but a new PageA instance was created.

Am I missing something or is this a bug?

Repro project
Prism.Navigation.zip

Steps to Reproduce

See attached repro project

Platform with bug

.NET MAUI

Affected platforms

iOS, Android

Did you find any workaround?

If you instead do NavigateAsync("../../../PageA") the navigation works as expected and the new navigation stack is MainPage/PageA but a new PageA instance was created.

Relevant log output

No response

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions