Incorporating Group Validation

In the previous example, you saw how the ViewModelBase.IsComplete method is used to trigger validation of a viewmodel. This section looks at extending the validation to set control-enabled states based on the presence of validation errors and at hiding validation errors until the user has had a chance to fill out the form.

Before proceeding, you may want to briefly review the section “Performing Group Validation” earlier in the chapter, and in particular Figure 26.7.

The SendEmailViewModel in the downloadable sample code is a more complex example of asynchronous input validation. In it, the sendEmailCommand is prevented from executing if it is already in execution or if the form is invalid.

When SendEmailView is ...

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.