/// <summary> /// Initializes a new instance of the <see cref="ZonesViewModel"/> class. /// </summary> /// <param name="navigationService">The navigation service.</param> public ZonesViewModel(NavigationServiceEx navigationService) { Devices = new ObservableCollection <Device>(); this.navigationService = navigationService; this.logger = App.ServiceProvider.GetService(typeof(ILogger <ZonesViewModel>)) as ILogger <ZonesViewModel>; this.service = App.ServiceProvider.GetService(typeof(MusicCastService)) as MusicCastService; }
private NavigationServiceEx InitializeNavigationService() { NavigationServiceEx navService = new NavigationServiceEx(); navService.Configure(nameof(MainPage), typeof(MainPage)); navService.Configure(nameof(SettingsPage), typeof(SettingsPage)); return(navService); }
public MainWindow() { this.InitializeComponent(); this.navigationServiceEx = new NavigationServiceEx(); this.navigationServiceEx.Navigated += this.NavigationServiceEx_OnNavigated; this.HamburgerMenuControl.Content = this.navigationServiceEx.Frame; // Navigate to the home page. this.Loaded += (sender, args) => this.navigationServiceEx.Navigate(new Uri("Vues/Test.xaml", UriKind.RelativeOrAbsolute)); }
private void AttractorLoopPlayer_Interacted(object sender, InteractedEventArgs args) { // get the locator from app.xaml ViewModels.ViewModelLocator Locator = Application.Current.Resources["Locator"] as ViewModels.ViewModelLocator; // use it to get the navigation service NavigationServiceEx NavigationService = Locator?.NavigationService; // navigate NavigationService?.Navigate(typeof(FlipViewViewModel).FullName); }
/// <summary> /// Initializes a new instance of the <see cref="DeviceDetailPageViewModel"/> class. /// </summary> /// <param name="navigationService">The navigation service.</param> public DeviceDetailPageViewModel(NavigationServiceEx navigationService) { this.InputList = new ObservableCollection <Input>(); this.FavoritesList = new ObservableCollection <Preset>(); this.navigationService = navigationService; this.service = App.ServiceProvider.GetService(typeof(MusicCastService)) as MusicCastService; navigationService.Navigated += NavigationService_NavigatedAsync; }
private void ConfigureNavigationService(NavigationServiceEx navigationService) { navigationService.Configure(NavigationSource.MainView.ToString(), typeof(MainView)); navigationService.Configure(NavigationSource.PhotoView.ToString(), typeof(PhotoView)); navigationService.Configure(NavigationSource.DocumentView.ToString(), typeof(DocumentView)); navigationService.Configure(NavigationSource.CurrentCategoryView.ToString(), typeof(CurrentCategoryView)); navigationService.Configure(NavigationSource.PostProccesView.ToString(), typeof(PostProccesView)); }
public UserStoriesViewModel( IVstsService vstsService, NavigationServiceEx navigationService, IDialogServiceEx dialogService, RecognitionService recognitionService, SpeechService speechService) : base(vstsService, navigationService, dialogService, recognitionService, speechService) { }
private void DeviceTwoButton_Click(object sender, RoutedEventArgs e) { // navigate to the next page (flipview) // get the locator from app.xaml ViewModels.ViewModelLocator Locator = Application.Current.Resources["Locator"] as ViewModels.ViewModelLocator; // use it to get the navigation service NavigationServiceEx NavigationService = Locator?.NavigationService; // navigate to the flipview page NavigationService?.Navigate(typeof(FlipViewViewModel).FullName); }
public SearchViewModel(IShopApiService shopService, NavigationServiceEx navigationService, ProgressService progressService) { _shopService = shopService; _navigationService = navigationService; _progressService = progressService; PropertyChanged += OnPropertyChanged; _facetsRequest = new FacetsRequest { Filters = new Dictionary <string, IList <string> > { { GenderFilter, new List <string> { GenderKey } } } }; }
private void AttractorLoopPlayer_Interacted(object sender, InteractedEventArgs args) { // get the locator from app.xaml ViewModels.ViewModelLocator Locator = Application.Current.Resources["Locator"] as ViewModels.ViewModelLocator; // use it to get the navigation service NavigationServiceEx NavigationService = Locator?.NavigationService; // navigate to the starting page - is choose pah enabled? if ((ConfigurationService.Current.IsLoaded) && (ConfigurationService.Current.Configuration.IsChoosePathPageEnabled)) { // go to the choose path page NavigationService?.Navigate(typeof(ChoosePathViewModel).FullName); } else { // no, so go to the intro hero page NavigationService?.Navigate(typeof(FlipViewViewModel).FullName); } }
static ViewModelLocator() { NavigationServiceEx _navigationService = new NavigationServiceEx(); void Register <VM, V>(IServiceCollection services) where VM : class { //services.AddTransient<VM>(); _navigationService.Configure(typeof(VM).FullName, typeof(V)); } ServiceCollection services = new ServiceCollection(); services.AddSingleton <IDialogService, DialogService>(); services.AddSingleton(s => _navigationService); services.AddSingleton(s => ResourceHelper.AppSettings); services.AddSingleton(s => new NativeInterop(Utils.CanvasDevice)); services.AddSingleton <UserCollectionsService>(); services.AddSingleton <MainViewModel>(); Register <MainViewModel, MainPage>(services); Ioc.Default.ConfigureServices(services.BuildServiceProvider()); }
public ArticlesViewModel(NavigationServiceEx navigationService, IShopApiService shopApiService, ProgressService progressService) { _navigationService = navigationService; _shopApiService = shopApiService; _progressService = progressService; }
public NavigableViewModelBase() { this.NavigationService = SimpleIoc.Default.GetInstance <NavigationServiceEx>(); }
public AuthViewModel(NetworkService networkService, NavigationServiceEx navigationService) { this.networkService = networkService; this.networkService.onSignedIn += SignedIn; this.navigationService = navigationService; }
public ShellViewModel(NavigationServiceEx navigationService) { this.navigationService = navigationService; }