c# - How to manage a failed data validation in WPF? -


I am compelled with data validation implemented by IDataErrorInfo when the data validation fails, the asset is set. How can I avoid the change of property when data validation fails?
Thanks a lot.

I do not think the value is not valid if the property value changes to avoid IDataErrorInfo can be used. It only helps to force the appropriate error message to UI so that the user can change the value given for valid values.

To avoid invalid values ​​being set in their properties, if they use the CLR property , use the verification method in the seters and if they are dependency properties , Use verification callback to properly validate the value.


Comments