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(); }); }); }
private void ExecuteCanExecute() { CanExecute = false; CanExecuteExampleCommand.RaiseCanExecuteChanged(); LogMessage = "You will not be able to execute can execute untile you toggle again!"; }