I have a page that shows customer information. I have a Customer class in my business layer project that I want to contain the validation logic. I'm struggling with the best way to achieve this using the built in mechanisms that WPF provies (assuming that's
the best route to go). I've seen examples where people throw exceptions from the individual field getters/setters of their business classes. I can't do that because this class is generatd by LINQ to SQL so all the fields getters/setters are already defined
in the auto generated partial class.
I decided I would just create a Validate() method on the Customer class that returns a list of errors and call that when the user clicks the Save button. I could just put some kind of logic in the UI to show a panel with a listing of errors or set some
tooltips on the form fields, but I was wondering if WPF had some built in support for this type of validation.
View Complete Post