public LoginContent() { UserId.EnableValidation(() => UserId); Password.EnableValidation(() => Password); UserId.PropertyValueChanged += (s, e) => IsValid.Value = Validate(); Password.PropertyValueChanged += (s, e) => IsValid.Value = Validate(); }
public LoginContent() { UserId.EnableValidation(() => UserId); Password.EnableValidation(() => Password); CanExecute.Bind( context => !string.IsNullOrEmpty(context.GetValueAt <string>(0)) && !string.IsNullOrEmpty(context.GetValueAt <string>(1)), UserId, Password ); }