예제 #1
0
 public override void OnPropertyChanged(string name)
 {
     if (RunOnUIAction != null)
     {
         RunOnUIAction.Invoke(() =>
         {
             base.OnPropertyChanged(name);
             PropertyChangedAction?.Invoke(name);
         });
     }
     else
     {
         base.OnPropertyChanged(name);
         PropertyChangedAction?.Invoke(name);
     }
 }
예제 #2
0
        public void ValidateAllCommands()
        {
#if (!NET35 && !NET40)
            if (RunOnUIAction != null)
            {
                RunOnUIAction.Invoke(() =>
                {
                    foreach (var item in Commands)
                    {
                        item.BaseValidateCanExecute(null);
                    }
                });
            }
            else
            {
                foreach (var item in Commands)
                {
                    item.BaseValidateCanExecute(null);
                }
            }
#else
            throw new NotSupportedException();
#endif
        }