PrismLibrary / PrismLibrary/Prism

[Enhancement] NavigateFrom

Open
#3,118 1 comment 3 reactions 1 assignee View on GitHub

Nobody has claimed this yet.

enhancement MAUI roadmap
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:

  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);
}

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.