Implemented relative back behavior ("../../") #1427
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description of Change
We have improved the relative back navigation feature to not require a page to push after the relative back instructions.
Behavioral Changes
Previously, when using the relative back feature ("../" ) you would be required to provide a page that would be pushed onto the navigation stack. That is no longer required. You may now chain together any number of relative go-back instructions to "go back".
For example:
Given your navigation stack looked like this:
NavigationPage/UserList/UserDetails/LoginPage/EditUser
You can now indicate how many pages to remove, or "go back" by chaining the relative go-back instruction "../".
NavigationService.NavigateAsync("../../../");
This would result in going back three pages leaving you with the following navigation stack:
``NavigationPage/UserList`
NOTE - The pages in the stack prior to the current page (last page in the nav stack) will be removed without calling any INavAware methods. Only the current page (EditUser in this example) would perform a proper GoBackAsync and execute the INavAware methods.
NOTE - This feature is only supported while within the context of a NavigationPage.
PR Checklist