O'Reilly logo

Windows® Phone 8 Unleashed by Daniel Vaughan

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required