Esempio n. 1
0
        public static async Task PushAsync(BaseViewModel viewModel)
        {
            var view = SimpleIoC.GetPage(viewModel.GetType());

            view.BindingContext = viewModel;
            await Navigation.PushAsync(view);
        }
Esempio n. 2
0
        public static async Task PushModalAsync(BaseViewModel viewModel, bool wrapInNavigation = true)
        {
            var view = SimpleIoC.GetPage(viewModel.GetType());

            view.BindingContext = viewModel;
            await Navigation.PushModalAsync(wrapInNavigation?new NavigationPage(view) : view);
        }
Esempio n. 3
0
        public static void SetRoot(object viewModel, bool wrapInNavigation = true)
        {
            var view = SimpleIoC.GetPage(viewModel.GetType());

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