public override void OnPropertyChanged(string name) { if (RunOnUIAction != null) { RunOnUIAction.Invoke(() => { base.OnPropertyChanged(name); PropertyChangedAction?.Invoke(name); }); } else { base.OnPropertyChanged(name); PropertyChangedAction?.Invoke(name); } }
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 }