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 the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.