Docs(IRouteNotifier): show how to use route change correctly #2915
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.
GitHub Issue (If applicable): closes #2663
PR Type
What kind of change does this PR introduce?
What is the current behavior?
The currently shown code sample is using
e.Region?.Namewhich is most of the time I did use it in e.g. my root MainPage with a NavigationView null or empty or if it had a value, that was nothing near the Route/Region names set in theRegisterRoutesRoute Map.What is the new behavior?
as mentioned in the linked issue report to this, we need to use
e.Navigator.Route?.ToString()in the event which is returning the Route Name then.Showing this in a mvvm + mvux realistic usable sample along with Localization might also make this feature of uno easier to understand and implement in our apps.
PR Checklist
Please check if your PR fulfills the following requirements:
Screenshots Compare Test Runresults.Other information
Users could also check out the video tutorial here, but as its only in german localization until now, I did not link it in the docs:
https://youtu.be/RZ3RirA7jhk
Internal Issue (If applicable):