This thread looks to be a little on the old side and therefore may no longer be relevant. Please see if there is a newer thread on the subject and ensure you're using the most recent build of any software if your question regards a particular product.
This thread has been locked and is no longer accepting new posts, if you have a question regarding this topic please email us at support@mindscape.co.nz
|
Hi - am just up skilling to WPF and am wondering about how to take advantage of the lightspeed validation errors in the UI of a WPF form. I have UI controls bound to fields in an entity. When those fields fail validation rules - I can see there is a collection of validation errors in the underlying entity. But how do I get the UI to reflect the errors returned by the entity when validation fails? I know I can implement WPF validation rules (inheriting my own classes from ValidationRule) - where WPF automatically highlights, say a textbox, with a red boarder when the rule fails. But since lightspeed already implements validation rules for me - is there a way to get the same result out of the box without having to replicate the same rules for the WPF bindings? Thanks! |
|
|
Hi KiwiRod, I've attached a sample project of my own implementation for WPF projects. This allows me to use the LightSpeed validation with no effort. Hope this helps. Kind regards, Johan J v Rensburg |
|
|
I've found this very effective home-built ErrorProvider (includes a very helpful overview of WPF validation). It seems to do the trick very nicely with very little effort: http://www.codeproject.com/KB/WPF/wpfvalidation.aspx |
|