My question is straightforward.Why this works:
public DelegateCommand LogInCommand { get; }Func<bool> canExecuteLogIn = () => !StringService.IsNullOrEmpty(_entries.LoginText, _entries.PasswordText);LogInCommand = new DelegateCommand(OnLogInTapped, canExecuteLogIn);
But this doesn't:
public DelegateCommand LogInCommand => new DelegateCommand(OnLogInTapped, () => !StringService.IsNullOrEmpty(_entries.LoginText, _entries.PasswordText));
I check like so:
public string LoginEntryText { get { return _entries.LoginText; } set { _entries.LoginText = value; LogInCommand?.RaiseCanExecuteChanged(); } }
Doesn't work, I mean that Func never executes after initialization.