PrismLibrary / PrismLibrary/Prism
[Enhancement] NavigateFrom
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 6.8k
- Forks
- 1.6k
- Avg merge
- 2d 1h
- Merged PRs (30d)
- 1
Description
Summary
You may find a scenario in which you may have a navigation stack like FlyoutPage/NavigationPage/ViewA/ViewB/ViewC/etc where the ViewModel's share a common shared base class that should be able to define a navigation event. The issue would be that you don't actually know how far back you need to navigate which makes it impractical to do ../../SomePage. For these scenarios we should add a NavigateFromAsync method which takes 2 arguments:
- The Name of the View we want to navigate from
- The route to navigate from that View
This API should then effectively do the same as ../../SomePage where the ../.. is replaced by going back until we found the View that was specified.
API Changes
public interface INavigationService
{
Task<INavigationResult> NavigateFromAsync(string viewName, Uri uri, INavigationParameters parameters);
}
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.