Example #1
0
        public AppViewModel()
        {
            ViewModelBase loginViewModel = ViewsFactory.CreateView("GameWindowView");

            loginViewModel.OnViewChange += LoginViewModel_OnViewChange;
            CurrentView = loginViewModel;
        }
Example #2
0
        private void App_OnViewChange(object sender, PropertyChangedEventArgs e)
        {
            ViewModelBase viewModel = ViewsFactory.CreateView(e.PropertyName);

            viewModel.OnViewChange += LoginViewModel_OnViewChange;
            CurrentView             = viewModel;
        }
        public async Task NavigateToAsync <View, ViewModel>(ViewModel viewModel)
            where View : Page
            where ViewModel : BaseViewModel
        {
            View page = ViewsFactory.CreateView <View>();

            page.BindingContext = viewModel;
            await GetMainPage().PushAsync(page);
        }