Property Setter Validation Limitations

,

Although the Silverlight 3 property setter validation system is simple and easy to use, it has two significant limitations: mutually dependent property validation is cumbersome, and there is no support for asynchronous validation.

The Silverlight 3 property setter validation system allows you to validate one property at a time. Some properties, however, may be mutually dependent, with the value of one property altering the validity of another property.

One approach to solving this problem, while still using the property setter validation system, is to use a set of shadow properties that perform composite semantic validation. This approach, however, falls short because it adds undue complexity and often leads to substantial code duplication.

The asynchronous validation features of Silverlight 4, which have been incorporated into the Windows Phone SDK, decouple input validation from properties and provide a better solution where composite validation is required.

Furthermore, asynchronous validation is needed in situations such as validating input on a remote server, where asynchronous WCF service calls are performed.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.116.21.229