In my dialogs I should do some simple validation. Most of the time it is only necessary to check whether an editor has a value (for mandatory fields) when the user presses the Ok-Button.
I've seen, that there is a kind of validation support built into the editors, but I don't know how I could use this. I played around with the properties of ValueContraint (e.g Nullable) but could not figure out, how the validation works.(I don't see anything if values are missing - no error messages, nothing)
I'm quite new to WPF and never worked with WPF-validation. So I appreciate every reply leading me in the right direction.
Markus
Hi Alex
Thanks for your suggestions. No. 3 is what I do now. I will have to check out 1. and 2.
Best Regards
Hello Markus,
There are couple of options for validation :
1. Value Constraing - you can see an overview and more information here : http://help.infragistics.com/NetAdvantage/WPF/2010.1/CLR3.5/?page=xamEditors_Overview_of_the_ValueEditor_Class.html
2. IDataErrorInfo interface - this is supported with versions after 9.2 and later
3. Manual validation - handle the EditModeEnding event and cancel it (e.Cancel = true) depending on the Cell or the Editor's value.