public static void Pop(View view) { var parent = FindParentNavigationView(view); if (parent is ModalView) { ModalView.Dismiss(); } else if (parent is NavigationView nav) { nav.Pop(); } }
public static void Navigate(View fromView, View view) { if (view is ModalView modal) { ModalView.Present(modal.Content); } else if (fromView.Navigation != null) { fromView.Navigation.Navigate(view); } else { ModalView.Present(view); } }