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