ValidationRule 构造函数

定义

初始化 ValidationRule 类的新实例。Initializes a new instance of the ValidationRule class.

重载

ValidationRule()

初始化 ValidationRule 类的新实例。Initializes a new instance of the ValidationRule class.

ValidationRule(ValidationStep, Boolean)

使用指定验证步骤以及指示在目标更新时是否运行验证规则的值来初始化 ValidationRule 类的新实例。Initializes a new instance of the ValidationRule class with the specified validation step and a value that indicates whether the validation rule runs when the target is updated.

ValidationRule()

初始化 ValidationRule 类的新实例。Initializes a new instance of the ValidationRule class.

protected:
 ValidationRule();
protected ValidationRule ();
Protected Sub New ()

适用于

ValidationRule(ValidationStep, Boolean)

使用指定验证步骤以及指示在目标更新时是否运行验证规则的值来初始化 ValidationRule 类的新实例。Initializes a new instance of the ValidationRule class with the specified validation step and a value that indicates whether the validation rule runs when the target is updated.

protected:
 ValidationRule(System::Windows::Controls::ValidationStep validationStep, bool validatesOnTargetUpdated);
protected ValidationRule (System.Windows.Controls.ValidationStep validationStep, bool validatesOnTargetUpdated);
new System.Windows.Controls.ValidationRule : System.Windows.Controls.ValidationStep * bool -> System.Windows.Controls.ValidationRule
Protected Sub New (validationStep As ValidationStep, validatesOnTargetUpdated As Boolean)

参数

validationStep
ValidationStep

枚举值之一,指定验证规则的运行时间。One of the enumeration values that specifies when the validation rule runs.

validatesOnTargetUpdated
Boolean

如果为 true,则使验证规则在 Binding 的目标更新时运行;否则为 falsetrue to have the validation rule run when the target of the Binding is updated; otherwise, false.

适用于