public MainPageViewModel(INavService navService, IEventAggregator eventAggregator, IDispatcherUiService dispatcherUiService)
 {
     _dispatcherUiService        = dispatcherUiService;
     navService.NavigationFailed = e => eventAggregator.GetEvent <ErrorEvent>().Publish(e);
     eventAggregator.GetEvent <ErrorEvent>().Subscribe(LogError);
     _dispatcherUiService.Run(navService.Navigate <LoginViewModel>);
 }
Exemplo n.º 2
0
 private void PrepareNavigation(TFe view)
 {
     if (_content == null)
     {
         _temporaryNavigation = view;
     }
     else
     {
         _temporaryNavigation = null;
         _dispatcherUiService.Run(() => SetContent(_content, view));
     }
 }