Example #1
0
        public static async Task PushModal(ViewModel viewModel, bool wrapInNavigation = true)
        {
            var view = NavigationMap.GetPage(viewModel.GetType());

            view.BindingContext = viewModel;
            await Navigation.PushModalAsync(wrapInNavigation?new NavigationPage(view) : view);
        }
Example #2
0
        public static async Task Push(ViewModel viewModel)
        {
            var view = NavigationMap.GetPage(viewModel.GetType());

            view.BindingContext = viewModel;
            await Navigation.PushAsync(view);
        }
Example #3
0
        public static void SetBase(object viewModel, bool wrapInNavigation = true)
        {
            var vmType = viewModel.GetType();
            var view   = NavigationMap.GetPage(vmType);

            view.BindingContext          = viewModel;
            Application.Current.MainPage = wrapInNavigation ? new NavigationPage(view) : view;
        }