Esempio n. 1
0
 private void ExecuteToggleCommand()
 {
     Task.Run(() => { LoadInProgress = true; Thread.Sleep(3000); LoadInProgress = false; }).
     ContinueWith((t) =>
     {
         _thisDispatcher.Invoke(() =>
         {
             LogMessage = "You can now Execute CanExecute!";
             CanExecute = true;
             CanExecuteExampleCommand.RaiseCanExecuteChanged();
         });
     });
 }
Esempio n. 2
0
 private void ExecuteCanExecute()
 {
     CanExecute = false;
     CanExecuteExampleCommand.RaiseCanExecuteChanged();
     LogMessage = "You will not be able to execute can execute untile you toggle again!";
 }