From 9d6e295291184ad0d3c7c91aea46fb2d01fcbec2 Mon Sep 17 00:00:00 2001 From: Adrian Edwards Date: Mon, 26 Mar 2018 19:21:52 -0700 Subject: [PATCH] Add a method to push a page as modal without automatically wrapping it in a NavigationPage --- VMFirstNav/NavigationService.cs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/VMFirstNav/NavigationService.cs b/VMFirstNav/NavigationService.cs index 90b25fa..075e491 100644 --- a/VMFirstNav/NavigationService.cs +++ b/VMFirstNav/NavigationService.cs @@ -201,6 +201,13 @@ public async Task PushModalAsync(T viewModel) where T : class, IViewModel await FormsNavigation.PushModalAsync(nv); } + public async Task PushModalPlainAsync(T viewModel) where T : class, IViewModel + { + var view = InstantiateView(viewModel); + + await FormsNavigation.PushModalAsync((Page)view); + } + public async Task PushAsync(Action initialize = null) where T : class, IViewModel { T viewModel;