public UglyDisplayViewModel() { _twitterizerService = TweetServiceLocator.GetDataService <LinqTweet>(); _uiDispatcherService = UiDispatcherLocator.GetDispatcher(); _mediator = MediatorLocator.GetMediator(); _mediator.Subscribe(ViewModelEvents.SwitchViewBlocked, ignore => { _allowSwitch = false; OnSwitchToPretty.RaiseCanExecuteChanged("OnSwitchToPretty"); }); _mediator.Subscribe(ViewModelEvents.SwitchViewUnblocked, ignore => { _allowSwitch = true; OnSwitchToPretty.RaiseCanExecuteChanged("OnSwitchToPretty"); }); }
static ShellViewModel() { Mediator = MediatorLocator.GetMediator(); UiDispatcherService = UiDispatcherLocator.GetDispatcher(); }