private NavigationClosure(INavigationService navigationService, object view, object viewModel, IViewInitializer viewInitializer) { _navigationService = navigationService; _view = view; _viewModel = viewModel; _viewInitializer = viewInitializer; }
public static void EnsureBound(INavigationService navigationService, IViewInitializer viewInitializer) { var existing = (NavigationMonitor)navigationService.GetValue(_monitorProperty); if (existing == null) { existing = new NavigationMonitor(navigationService, viewInitializer); navigationService.Navigating += existing.Navigating; navigationService.Navigated += existing.Navigated; navigationService.SetValue(_monitorProperty, existing); } }
/// <summary> /// Initializes a new instance of the <see cref="ViewModelRouteHandler"/> class. /// </summary> /// <param name="factory">The factory.</param> /// <param name="initializer">The initializer.</param> public ViewModelRouteHandler(IViewModelFactory factory, IViewInitializer initializer) { this.factory = factory; this.initializer = initializer; }
public NavigationMonitor(INavigationService navigationService, IViewInitializer viewInitializer) { _navigationService = navigationService; _viewInitializer = viewInitializer; }
public static NavigationClosure Bind(INavigationService navigationService, object view, object viewModel, IViewInitializer initializer) { var closure = new NavigationClosure(navigationService, view, viewModel, initializer); navigationService.Navigated += closure.Navigated; return closure; }
public static NavigationClosure Bind(INavigationService navigationService, object view, object viewModel, IViewInitializer initializer) { var closure = new NavigationClosure(navigationService, view, viewModel, initializer); navigationService.Navigated += closure.Navigated; return(closure); }