Exemple #1
0
 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);
         }
     });
 }
Exemple #2
0
        public void RaiseCanExecuteChanged(bool onUIThread = true)
        {
            if (onUIThread == true)
            {
                RunOnUiThreadAction?.Invoke(() =>
                {
                    CanExecuteChanged?.Invoke(this, EventArgs.Empty);
                });
            }
            else
            {
                CanExecuteChanged?.Invoke(this, EventArgs.Empty);
            }

            //
        }