(X) Hide this Join the upcoming webinar: Deep-DIVE in Silverlight FIVE by Gill Cleeren. August 24, 10 am PDT (check your local time).
Sign up for this session | Full agenda | Watch recordings of past webinars
SilverlightShow most popular article series are now available as offline downloads, packed with source code. Check out our Ebook shelf!
    • Login
    • Join
      • Generate New Image
        By clicking 'Register' you accept the terms of use .
        Login with Facebook

IDataErrorInfo in an Example to Stop Last Christmas by Wham

(0 votes)
0 comments   /   posted by Silverlight Show on Dec 19, 2009
Tags:   idataerrorinfo , silverlight-4
In this post Gill Cleeren concentrates on another data binding-related feature that's new in Silverlight 4, namely the support for the IDataErrorInfo interface.

The fact that Silverlight supports this interface now, means we can fully use it to help with the display of validation errors in a data binding scenario. [...]

When we are binding an object of a class that implements the IDataErrorInfo, Silverlight will automatically check each field for validation errors using the indexer. In here, we can write validation code that will check if the specified value is valid and if not, return the error message for that field. Silverlight will then automatically display the error for the field.


Comments

No comments

Add Comment

Login to comment:
  *      *       
Login with Facebook

Latest News

  • Rate the SilverlightShow Ebooks You Purchased
  • Join the Windows Phone UG Aug '11 Meeting. Learn how to design better apps!
  • How to Create a Multi-Column Auto-Complete Drop-down Box in LightSwitch
  • Pay-per-View vs. Pay-per-Click in Mobile Advertising