public App() { InitializeComponent(); // Configure and register the MVVM Light NavigationService var nav = new ViewNavigationService(); SimpleIoc.Default.Register <IViewNavigationService>(() => nav); nav.Configure(ViewModelLocator.HomePageKey, typeof(HomePage)); nav.Configure(ViewModelLocator.DashboardPageKey, typeof(DashboardPage)); //nav.Configure(ViewModelLocator.TabOnePageKey, typeof(TabOnePage)); var locator = new ViewModelLocator(); SimpleIoc.Default.Register <ViewModelLocator>(() => locator); var mainPage = nav.SetRootPage(ViewModelLocator.HomePageKey); //var mainPage = nav.SetRootPage(ViewModelLocator.TabOnePageKey); MainPage = mainPage; }
private static INavigationService GetInitializedNavigationService() { var navigationService = new ViewNavigationService(); navigationService.Configure("Login", typeof(LoginPage)); navigationService.Configure("Notes", typeof(NotesPage)); navigationService.Configure("NoteEntry", typeof(NoteEntryPage)); return(navigationService); }
public void RegisterViews() { ViewNavigationService.Configure("MainPage", typeof(MainPage)); ViewNavigationService.Configure("ProfilePage", typeof(Views.User.ProfilePage)); ViewNavigationService.Configure("SimpleLoginPage", typeof(Views.Login.SimpleLoginPage)); ViewNavigationService.Configure("SimpleSignUpPage", typeof(Views.Login.SimpleSignUpPage)); ViewNavigationService.Configure("CustomersListPage", typeof(Views.Marketer.CustomersListPage)); ViewNavigationService.Configure("NewCustomerPage", typeof(Views.Marketer.NewCustomerPage)); ViewNavigationService.Configure("StartSalesPage", typeof(Views.Sales.StartSalesPage)); ViewNavigationService.Configure("PaymentPage", typeof(Views.Sales.PaymentPage)); ViewNavigationService.Configure("CheckoutPage", typeof(Views.Sales.CheckoutPage)); }
public void RegisterViews() { ViewNavigationService.Configure("MainPage", typeof(MainPage)); ViewNavigationService.Configure("ProfilePage", typeof(Views.User.ProfilePage)); ViewNavigationService.Configure("SimpleLoginPage", typeof(Views.Login.SimpleLoginPage)); ViewNavigationService.Configure("SimpleSignUpPage", typeof(Views.Login.SimpleSignUpPage)); ViewNavigationService.Configure("SimpleResetPasswordPage", typeof(Views.Login.SimpleResetPasswordPage)); ViewNavigationService.Configure("SimpleForgotPasswordPage", typeof(Views.Login.SimpleForgotPasswordPage)); ViewNavigationService.Configure("CustomersListPage", typeof(Views.Marketer.CustomersListPage)); ViewNavigationService.Configure("NewCustomerPage", typeof(Views.Marketer.NewCustomerPage)); ViewNavigationService.Configure("StartSalesPage", typeof(Views.Sales.StartSalesPage)); ViewNavigationService.Configure("SelectProductPage", typeof(Views.Sales.SelectProductPage)); ViewNavigationService.Configure("PaymentPage", typeof(Views.Sales.PaymentPage)); ViewNavigationService.Configure("PaymentFailedPage", typeof(Views.Sales.PaymentFailedPage)); ViewNavigationService.Configure("PaymentSuccessfulPage", typeof(Views.Sales.PaymentSuccessfulPage)); ViewNavigationService.Configure("Recharges", typeof(Views.User.Recharges)); ViewNavigationService.Configure("Transactions", typeof(Views.User.Transactions)); }
public App() { try { InitializeComponent(); Constants.InitConstatns(); InitCryptMethod(); CrossMultilingual.Current.CurrentCultureInfo = new CultureInfo(SelectedLanguage.ToLower()); AppResources.Culture = CrossMultilingual.Current.CurrentCultureInfo; NavigationService.Configure("MainPage", typeof(MainPage)); NavigationService.Configure("DetailsPage", typeof(DetailsPage)); NavigationService.Configure("SettingsPage", typeof(SettingsPage)); NavigationService.Configure("LoginPage", typeof(LoginPage)); NavigationService.Configure("PasswordChangePage", typeof(PasswordChangePage)); NavigationService.Configure("PasswordSetPage", typeof(PasswordSetPage)); NavigationService.Configure("AboutPage", typeof(AboutPage)); NavigationService.Configure("HelpPage", typeof(HelpPage)); if (!IsUserLoggedIn) { if (!string.IsNullOrWhiteSpace(UserPassword)) { MainPage = NavigationService.SetRootPage("LoginPage"); } else { MainPage = NavigationService.SetRootPage("PasswordSetPage"); } } else { MainPage = NavigationService.SetRootPage("MainPage"); } } catch (Exception ex) { UserDialogsService.DisplayException(ex); } }