I've implemented for a lot of my TextBox
a ValidationRule
:
<TextBox>
<TextBox.Text>
<Binding Path="Property" Mode="TwoWay">
<Binding.ValidationRules>
<validator:MyRule ErrorMessage="Must be a number"/>
</Binding.ValidationRules>
</Binding>
</TextBox.Text>
</TextBox>
So Is there a way to detect in code behind (or some XAML binding) if an error is raised by a ValidationRule
to disable my Save button?