static ViewModelBase() { DefaultRegistration.EnsureRegistered(); _navigator = ServiceLocator.Default.Resolve <INavigator>(); _dialogService = ServiceLocator.Default.Resolve <IDialogService>(); _dispatcher = ServiceLocator.Default.Resolve <IDispatcher>(); _designModeChecker = ServiceLocator.Default.Resolve <IDesignModeChecker>(); }
protected ViewModelLocatorBase() { DefaultRegistration.EnsureRegistered(); _designModeChecker = Resolve <IDesignModeChecker>(); CallFirst(); if (_designModeChecker.IsInDesignMode()) { CallOnlyInDesigntime(); } else { CallOnlyInRuntime(); } CallLast(); }