/// <summary> /// Initializes the singleton application object. This is the first line of authored code /// executed, and as such is the logical equivalent of main() or WinMain(). /// </summary> public App() { this.InitializeComponent(); var nav = new GalaSoft.MvvmLight.Views.NavigationService(); nav.Configure(ViewModelLocator.StateFoundKey, typeof(Views.Conditions)); nav.Configure(ViewModelLocator.TimeTempKey, typeof(Views.TimeTemp)); SimpleIoc.Default.Register <GalaSoft.MvvmLight.Views.INavigationService>(() => nav); this.Suspending += this.OnSuspending; }
/// <summary> /// Initializes the singleton application object. This is the first line of authored code /// executed, and as such is the logical equivalent of main() or WinMain(). /// </summary> public App() { this.InitializeComponent(); this.Suspending += this.OnSuspending; var nav = new GalaSoft.MvvmLight.Views.NavigationService(); // configure the service nav.Configure(ViewModelLocator.MainViewKey, typeof(MainPage)); nav.Configure(ViewModelLocator.SecondViewKey, typeof(SecondPage)); // register the service SimpleIoc.Default.Register <GalaSoft.MvvmLight.Views.INavigationService>(() => nav); }
public NavigationService() { navigationService = new GalaSoft.MvvmLight.Views.NavigationService(); navigationService.Configure(Location.Main.ToString(), typeof(View.MainPage)); navigationService.Configure(Location.Login.ToString(), typeof(View.CrmLoginPage)); }