Displaying Error Details
Highlighting an invalid field indicates that the field needs attention, but it does not tell the user why. Feedback should be provided describing the nature of the error and how it can be corrected. In Silverlight for the browser, this is achieved using the ValidationSummary
control. Unfortunately, no such control exists in the Windows Phone FCL. But that does not stop us from making our own!
A Custom ValidationSummary Control
Included in the downloadable sample code is a simple control for displaying all errors that occur on a page. It is named the same as its browser counterpart: ValidationSummary
. When placed on a page, it retrieves the page and subscribes the page’s BindingValidationError
event during its Loaded ...
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.