I want to check a business rule before I bind the data the user enters into a textbox? Before I bind the data to the model, I need to ensure it meets a certain criteria. This would be very easy to do if I could execute a method before the binding occurs. Is there a way for me to do this?
Share
You can implement
ValidationRule:And use it in your binding:
Where
validationis a XML namespace alias for namespace whereCustomValidationRuleis defined (addxmlns:validation="clr-namespace:NAMESPACE_NAME_HERE"to your XAML).