public ViewModelContainer(
            IAppearanceService appearanceService,
            IExceptionHandlingService exceptionHandlingService,
            IExceptionConfigurationService exceptionConfigurationService,
            IInformationConfigurationService informationConfigurationService,
            INavigationConfigurationService navigationConfigurationService,
            IMainNavigationInitializingService mainNavigationInitializer)
        {
            _appearanceService         = appearanceService;
            _exceptionHandlingService  = exceptionHandlingService;
            _mainNavigationInitializer = mainNavigationInitializer;
            exceptionConfigurationService.AddExceptionCallback(ShowExceptionMessageCallback);
            navigationConfigurationService.AddNavigationRequestedCallback(NavigateToViewModelCallback);
            informationConfigurationService.RegisterForTypes(
                ShowInformationMessageCallback,
                InformationType.Error,
                InformationType.Important,
                InformationType.Success,
                InformationType.Warning);

            SelectedAppearanceTheme = _appearanceService.LoadPersistedAppearanceTheme();
            _mainNavigationInitializer.NavigateToMainEntryPoint();
        }
Exemplo n.º 2
0
 public NavigationService(INavigationConfigurationService navigationConfigurationService, IViewModelFactory containerViewModelBaseFactory)
 {
     _navigationConfigurationService = navigationConfigurationService;
     _containerViewModelBaseFactory  = containerViewModelBaseFactory;
 }
 public NavigationService(INavigationConfigurationService navigationHandlerConfiguration, IViewModelFactory viewModelFactory)
 {
     _navigationHandlerConfiguration = navigationHandlerConfiguration;
     _viewModelFactory = viewModelFactory;
 }