static ViewModelBase()
 {
     DefaultRegistration.EnsureRegistered();
     _navigator         = ServiceLocator.Default.Resolve <INavigator>();
     _dialogService     = ServiceLocator.Default.Resolve <IDialogService>();
     _dispatcher        = ServiceLocator.Default.Resolve <IDispatcher>();
     _designModeChecker = ServiceLocator.Default.Resolve <IDesignModeChecker>();
 }
示例#2
0
        protected ViewModelLocatorBase()
        {
            DefaultRegistration.EnsureRegistered();
            _designModeChecker = Resolve <IDesignModeChecker>();

            CallFirst();
            if (_designModeChecker.IsInDesignMode())
            {
                CallOnlyInDesigntime();
            }
            else
            {
                CallOnlyInRuntime();
            }
            CallLast();
        }