public AskToCreateEventViewModel() { Title = "Automatically update CoApp packages?"; UpdateService = new LocalServiceLocator().UpdateService; CoAppService = new LocalServiceLocator().CoAppService; ElevateSetScheduledTask = new RelayCommand(RunElevateSetScheduleTask); DontScheduleTask = new RelayCommand(Leave); SetScheduledTask = new RelayCommand(() => { UpdateService.SetDefaultScheduledTask().ContinueWith(t => { if ( t . IsCanceled || t . IsFaulted) { Logger . Error ("We couldn't set update task. {0} {1}", t . Exception . Message, t . Exception . StackTrace); var modalModel = new BasicModalViewModel { Title = "We couldn't set update task", Content = "The update task couldn't be set", }; modalModel . SetViaButtonDescriptions (new List < ButtonDescription > { new ButtonDescription { Title = "Continue" } }); MessengerInstance . Send ( new MetroDialogBoxMessage { ModalViewModel = modalModel } ); } Leave (); }); }); }