Provisioning for Asynchronous or Synchronous Validation

The validation infrastructure contained in the ViewModelBase and the DataErrorNotifier classes caters for both asynchronous and synchronous validation models. When using this system, validation code should reside in one of two overridable methods: BeginValidation or GetPropertyErrors.

BeginValidation uses an asynchronous event driven validation model, and GetPropertyErrors provides for a simpler synchronous model for when asynchronous processing is not required.

DataValidationError Class

When using either the synchronous or asynchronous validation models, validation errors are represented using a custom class named DataValidationError. DataValidationError has an ErrorMessage property of ...

Get Windows® Phone 8 Unleashed now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.