Validation in WPF
I googled a lot but not getting how to do validation in WPF.
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Pradeep ShetPosted Jan 15, 2015, 1:55 AM
You can add validation at model level by using DataAnnonations. This is the best way of adding business validation.
using System.ComponentModel.DataAnnonations;
Eg- public class Customer
{
[Required]
public string CustomerName {get;set;}
}
For reference,
http://www.codeproject.com/Articles/256183/DataAnnotations-Validation-for-Beginner
Munesh SharmaPosted Jan 13, 2015, 6:58 AM
Manish Kumar ChoudharyPosted Jan 13, 2015, 6:37 AM
Hi swapnil mukewar,
Go through following links it will help you
http://www.codeproject.com/Tips/690130/Simple-Validation-in-WPF
http://www.c-sharpcorner.com/UploadFile/fd59f5/data-validations-in-wpf/
http://blog.magnusmontin.net/2013/08/26/data-validation-in-wpf/