Docs(IRouteNotifier): show how to use route change correctly - #2915
Open
DevTKSS wants to merge 4 commits into
Open
Docs(IRouteNotifier): show how to use route change correctly#2915DevTKSS wants to merge 4 commits into
DevTKSS wants to merge 4 commits into
Conversation
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR corrects and significantly expands the documentation for using IRouteNotifier in Uno Platform applications. The key improvement is fixing the incorrect route name access pattern (from e.Region?.Name to e.Navigator.Route?.ToString()), which was returning incorrect or null values.
Key changes:
- Corrected the method for accessing the current route name using
e.Navigator.Route?.ToString()instead ofe.Region?.Name - Added comprehensive examples showing how to integrate
IRouteNotifierwith localization support for both MVVM and MVUX patterns - Reorganized content with numbered sections and clearer structure
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
DevTKSS
force-pushed
the
docs-IRouteNotifier-implement-RouteChange
branch
from
December 11, 2025 20:59
5ef6973 to
332a268
Compare
Contributor
Author
|
@kazo0 could we finalize this PR to get it released to the docs? the current sample is not working in at least MVUX Models in my apps, just copied that sample... 🤷 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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):