Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Enhancement] NavigateFrom #3118

Open
dansiegel opened this issue Apr 3, 2024 · 1 comment · May be fixed by #3182
Open

[Enhancement] NavigateFrom #3118

dansiegel opened this issue Apr 3, 2024 · 1 comment · May be fixed by #3182
Assignees
Milestone

Comments

@dansiegel
Copy link
Member

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:

  1. The Name of the View we want to navigate from
  2. 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);
}
@dansiegel dansiegel added this to the vNext milestone Apr 3, 2024
@dansiegel dansiegel self-assigned this Apr 3, 2024
@niimima
Copy link
Contributor

niimima commented Jul 5, 2024

Hi, I'm interested in working on this issue.
If I have any questions about specifications or behavior I will comment.

@dansiegel dansiegel assigned niimima and unassigned dansiegel Jul 5, 2024
@niimima niimima linked a pull request Jul 5, 2024 that will close this issue
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants