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