public void OnNavigatedTo(NavigationContext navigationContext) { ViewModel = (GeotagFileBrowserViewModel)navigationContext.Parameters["viewModel"]; DataContext = ViewModel; ViewModel.OnNavigatedTo(navigationContext); }
public void OnNavigatedTo(NavigationContext navigationContext) { if (navigationContext.Parameters != null && navigationContext.Parameters.Any()) { var dishes = navigationContext.Parameters["Dishes"] as List<DishViewModel>; if (dishes != null) ViewModel = new OrderViewModel(dishes) { Repository = Repository, NavigationService = navigationContext.NavigationService }; else ViewModel = new OrderViewModel { Repository = Repository, NavigationService = navigationContext.NavigationService }; } else ViewModel = new OrderViewModel { Repository = Repository, NavigationService = navigationContext.NavigationService }; }
public void OnNavigatedTo(NavigationContext navigationContext) { ViewModel = (MediaFileBrowserImagePanelViewModel)navigationContext.Parameters["viewModel"]; DataContext = ViewModel; ViewModel.OnNavigatedTo(navigationContext); }
public void OnNavigatedTo(NavigationContext navigationContext) { string ParametroRecibido = navigationContext.Parameters["TheText"]; // ReceptionTextBox.Text = ParametroRecibido; // este codigo es para una implantación con codebehinde RecepcionDato = ParametroRecibido; System.Windows.MessageBox.Show(String.Format("El parametro recibido es :/{0}/", ParametroRecibido)); }
public void OnNavigatedTo(NavigationContext navigationContext) { menu = new RTIMainView(); menu.AboutButton.Command = aboutCommand; ribbonService.AddRibbonItem(menu, true); }
public void OnNavigatedFrom(NavigationContext navigationContext) { foreach (var tabItem in _tabs) { tabItem.ViewModel.Deinitialize(navigationContext); } }
/// <summary> /// 当前的页面被导航到以后发生,这个函数可以用来处理URI的参数 /// </summary> /// <param name="navigationContext"></param> public void OnNavigatedTo(NavigationContext navigationContext) { if (TagMsg == null || TagMsg == "") { TagMsg = "密码"; } }
public void OnNavigatedTo(Microsoft.Practices.Prism.Regions.NavigationContext navigationContext) { int hash = int.Parse(navigationContext.Parameters["authenticationhash"]); _authentic = (Authentication)NavigatePatameters.Request(hash); GetServers(); }
public void WhenRegionHasMultipleViews_ThenViewsWithMatchingTypeNameAreConsidered() { // Arrange var serviceLocatorMock = new Mock<IServiceLocator>(); var region = new Region(); var view1 = new TestView(); var view2 = "view"; region.Add(view1); region.Add(view2); var navigationContext = new NavigationContext(null, new Uri(view2.GetType().Name, UriKind.Relative)); var navigationTargetHandler = new TestRegionNavigationContentLoader(serviceLocatorMock.Object); // Act var returnedView = navigationTargetHandler.LoadContent(region, navigationContext); // Assert Assert.AreSame(view2, returnedView); }
/// <summary> /// Initializes a new instance of the <see cref="RegionNavigationEventArgs"/> class. /// </summary> /// <param name="navigationContext">The navigation context.</param> public RegionNavigationEventArgs(NavigationContext navigationContext) { if (navigationContext == null) throw new ArgumentNullException("navigationContext"); Contract.EndContractBlock(); this.NavigationContext = navigationContext; }
public bool IsNavigationTarget(NavigationContext navigationContext) { return true; // If you want to create multiple versions of this view then you need to set the // PartCreationPolicy to NonShared and write code to determine if the view is // a navigation target or not. }
public void OnNavigatedTo(NavigationContext navigationContext) { ViewModel = (ImageViewModel)navigationContext.Parameters["viewModel"]; DataContext = ViewModel; ViewModel.OnNavigatedTo(navigationContext); }
private void RaiseNavigating(NavigationContext navigationContext) { if (this.Navigating != null) { this.Navigating(this, new RegionNavigationEventArgs(navigationContext)); } }
public void OnNavigatedTo(NavigationContext navigationContext) { _trackMenuBarToken = _eventAggregator.GetEvent<TrackCommandBarEvent>().Subscribe(OnTrackMenuBarEvent, true); _tracksMenuBarToken = _eventAggregator.GetEvent<TracksCommandBarEvent>().Subscribe(OnTracksMenuBarEvent, true); Album = navigationContext.Tag as IAlbum; }
public bool IsNavigationTarget( NavigationContext navigationContext ) { // Called to see if this view can handle the navigation request. If it can, this view is activated. // This view is always the navigation target so return true. return true; }
public void WhenViewExistsAndDoesNotImplementINavigationAware_ThenReturnsView() { // Arrange var serviceLocatorMock = new Mock<IServiceLocator>(); var region = new Region(); var view = new TestView(); region.Add(view); var navigationContext = new NavigationContext(null, new Uri(view.GetType().Name, UriKind.Relative)); var navigationTargetHandler = new TestRegionNavigationContentLoader(serviceLocatorMock.Object); // Act var returnedView = navigationTargetHandler.LoadContent(region, navigationContext); // Assert Assert.AreSame(view, returnedView); }
public void OnNavigatedTo(NavigationContext navigationContext) { if (navigationContext.Parameters != null && navigationContext.Parameters.Any()) { var id = (int?) navigationContext.Parameters["Id"]; if (id.HasValue) { ViewModel = new DishViewModel(id.Value) { Repository = Repository }; } else { ViewModel = new DishViewModel { Repository = Repository }; } } else ViewModel = new DishViewModel { Repository = Repository }; }
public void OnNavigatedTo(NavigationContext navigationContext) { ViewModel = (MediaFileStackPanelViewModel)navigationContext.Parameters["viewModel"]; DataContext = ViewModel; if (ViewModel == null) { collapseableGrid.Visibility = System.Windows.Visibility.Collapsed; collapseableButtonGrid.Visibility = System.Windows.Visibility.Collapsed; return; } else { Binding binding = new Binding(); binding.Path = new PropertyPath("IsEnabled"); binding.Converter = new BooleanToVisibilityConverter(); binding.Source = ViewModel; BindingOperations.SetBinding(collapseableButtonGrid, Grid.VisibilityProperty, binding); binding = new Binding(); binding.Path = new PropertyPath("IsVisible"); binding.Converter = new BooleanToVisibilityConverter(); binding.Source = ViewModel; BindingOperations.SetBinding(collapseableGrid, Grid.VisibilityProperty, binding); } if (ViewModel.IsEnabled == false) return; ViewModel.MediaStateCollectionView.Cleared += MediaStateCollectionView_Cleared; ViewModel.OnNavigatedTo(navigationContext); }
public void OnNavigatedFrom(NavigationContext navigationContext) { if (ViewModel != null) { ViewModel.MediaStateCollectionView.Cleared -= MediaStateCollectionView_Cleared; ViewModel.OnNavigatedFrom(navigationContext); } }
public bool IsNavigationTarget( NavigationContext navigationContext ) { // Called to see if this view can handle the navigation request. If it can, this view is activated. // Check the ID of the currently displayed item against the ID navigation parameter. string id = navigationContext.Parameters["ID"]; return CurrentItem == null ? false : CurrentItem.Id.Equals( id ); }
public override void OnNavigatedTo(NavigationContext navigationContext) { base.OnNavigatedTo(navigationContext); var job = navigationContext.Parameters["Job"] as Models.JobModel; this.Job = job; this.LoadData(); }
/// <summary> /// Initializes a new instance of the <see cref="RegionNavigationEventArgs"/> class. /// </summary> /// <param name="navigationContext">The navigation context.</param> public RegionNavigationFailedEventArgs(NavigationContext navigationContext) { if (navigationContext == null) { throw new ArgumentNullException("navigationContext"); } this.NavigationContext = navigationContext; }
public void ConfirmNavigationRequest(NavigationContext navigationContext, Action<bool> continuationCallback) { bool result = true; // TODO: Implement code to set result ... continuationCallback(result); }
void INavigationAware.OnNavigatedTo(NavigationContext navigationContext) { if (navigationContext == null) { throw new ArgumentNullException("navigationContext"); } Name = navigationContext.Parameters["Name"] as string; }
public override void OnNavigatedTo(Microsoft.Practices.Prism.Regions.NavigationContext navigationContext) { if (navigationContext.Parameters != null && navigationContext.Parameters.Count() > 0) { var id = navigationContext.Parameters; } base.OnNavigatedTo(navigationContext); navigationService = navigationContext.NavigationService; }
//implementacion de INavigationAware public void OnNavigatedTo(NavigationContext navigationContext) { this.RegionManager.Regions[RegionNames.SubMenuRegion].ClearActiveViews(); DiagramFactory.LoadDiagram(this.diagram, "ModulesDiagram"); this.diagram.AutoFit(); SetMenuControl(); }
public void OnNavigatedFrom(NavigationContext navigationContext) { /*while (Rm.Regions["youtubeExpanderPanelRegion"].Views.Count() > 0) { Rm.Regions["youtubeExpanderPanelRegion"].Remove(Rm.Regions["youtubeExpanderPanelRegion"].Views.FirstOrDefault()); } Rm.Regions.Remove("youtubeExpanderPanelRegion");*/ }
public void OnNavigatedTo(NavigationContext navigationContext) { string l; if (IsolatedStorageSettings.ApplicationSettings.TryGetValue(Consts.SettingsLoginKey, out l)) { Login = l; } Password = string.Empty; }
public override void OnNavigatedTo(Microsoft.Practices.Prism.Regions.NavigationContext navigationContext) { if (navigationContext.Parameters != null && navigationContext.Parameters.Count() > 0) { string id = navigationContext.Parameters["ID"].ToString(); var myParameter = navigationContext.Parameters["myObjectParameter"]; } base.OnNavigatedTo(navigationContext); navigationService = navigationContext.NavigationService; }
public void OnNavigatedTo(NavigationContext navigationContext) { foreach (var tabItem in _tabs) { tabItem.ViewModel.SetModel(this); tabItem.ViewModel.Initialize(navigationContext); } Tabs.MoveCurrentToFirst(); }
private Guid? GetRequestedEmailId(NavigationContext navigationContext) { var email = navigationContext.Parameters[EmailIdKey]; Guid emailId; if (email != null && Guid.TryParse(email, out emailId)) { return emailId; } return null; }
public void OnNavigatedTo(NavigationContext navigationContext) { var artist = navigationContext.Tag as IArtist; foreach (var tabItem in _tabs) { tabItem.ViewModel.SetModel(artist); tabItem.ViewModel.Initialize(navigationContext); } Tabs.MoveCurrentToFirst(); }
public void OnTuneIn(NavigationContext context) { Task.Factory.StartNew(() => { using (LoadingIndicatorService.EnterLoadingBlock()) { Radio.Play( Radio.GetTracksByName("NOFX").OrderBy(t => t.TotalDuration).Take(2). ToTrackStream("My custom track stream")); } }); }
public void OnNavigatedFrom(Microsoft.Practices.Prism.Regions.NavigationContext navigationContext) { navigationContext.Parameters.Add("PageFrom", this.ToString()); }
public bool IsNavigationTarget(Microsoft.Practices.Prism.Regions.NavigationContext navigationContext) { return(false); }