Defining Validation Visual States in Windows Phone

When a binding error occurs, the data-binding system transitions the VisualState of the FrameworkElement to an invalid state. In Silverlight for the browser, various controls come ready to display validation errors. Unfortunately, those styles have not been incorporated into Windows Phone because the styles are not immediately transferable to the phone due to the reduced size of the phone display. Consequently, if you want to harness the existing validation infrastructure, you must replace the template for each control for which you intend to display validation errors.

Replacing a control’s template can be done using Expression Blend. A copy can be made of the template, and error related VisualStates ...

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.