Example #1
0
 private NavigationClosure(INavigationService navigationService, object view, object viewModel, IViewInitializer viewInitializer)
 {
     _navigationService = navigationService;
     _view            = view;
     _viewModel       = viewModel;
     _viewInitializer = viewInitializer;
 }
Example #2
0
            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 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);
     }
 }
 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;
 }
 private NavigationClosure(INavigationService navigationService, object view, object viewModel, IViewInitializer viewInitializer)
 {
     _navigationService = navigationService;
     _view = view;
     _viewModel = viewModel;
     _viewInitializer = viewInitializer;
 }
 /// <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;
 }
Example #9
0
 public NavigationMonitor(INavigationService navigationService, IViewInitializer viewInitializer)
 {
     _navigationService = navigationService;
     _viewInitializer   = viewInitializer;
 }
Example #10
0
            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);
            }