コード例 #1
0
        public LoginContent()
        {
            UserId.EnableValidation(() => UserId);
            Password.EnableValidation(() => Password);

            UserId.PropertyValueChanged   += (s, e) => IsValid.Value = Validate();
            Password.PropertyValueChanged += (s, e) => IsValid.Value = Validate();
        }
コード例 #2
0
ファイル: LoginContent.cs プロジェクト: averrunci/AvaloniaMvc
        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
                );
        }