Does ValidationRule.Validate(object, CultureInfo, BindingExpressionBase) get called automatically if overridden?

6 days ago 9
ARTICLE AD BOX

I have a custom WPF `ValidationRule` and I want the validation range to depend on another value in the view model.

I used to use this two-argument override:

public override ValidationResult Validate(object value, CultureInfo cultureInfo)

There is also this overload:

public override ValidationResult Validate(object value, CultureInfo cultureInfo, BindingExpressionBase owner)

My question is: if I override the 3-argument version, does WPF automatically call it during normal Binding validation instead of the 2-argument version? Is there any official guarantee about overload selection, or is this framework-dependent / scenario-dependent? I can't not define the 2-argument version and only defined the 3-argument version, I get this compiler error:

Abstract inherited member 'ValidationResult System.Windows.Controls.ValidationRule.Validate(object, CultureInfo)' is not implemented

So I defined both in my application, and the 3-argument override seems to be called but I want a guarantee.

Read Entire Article