public static void BulkNotifyRaiseCanExecuteChanged(IEnumerable <DelegateCommand> commands) { //update all on the ui in a single call to the UI RunOnUiThreadAction?.Invoke(() => { foreach (var command in commands) { command.RaiseCanExecuteChanged(false); } }); }
public void RaiseCanExecuteChanged(bool onUIThread = true) { if (onUIThread == true) { RunOnUiThreadAction?.Invoke(() => { CanExecuteChanged?.Invoke(this, EventArgs.Empty); }); } else { CanExecuteChanged?.Invoke(this, EventArgs.Empty); } // }