LacisSLValidator

A Silverlight based control validator.
Download

LacisSLValidator Ranking & Summary

Advertisement

  • Rating:
  • License:
  • Ms-PL
  • Publisher Name:
  • lkoszegi
  • Operating Systems:
  • Windows 2K / XP / 2003 / Vista
  • File Size:
  • 7 KB

LacisSLValidator Tags


LacisSLValidator Description

The LacisSLValidator was developed to be a Silverlight based control validator. The base idea was to create a validator that resembles the ASP.NET validation logic (validator and validation summary). The controls can be templated and the creation of custom validators is also supported. The validation is performed when the FrameworkElement losses focus. Validator Control With the help of this control you can validate other FrameworkElements. Because in Silverlight it is not possible to bind a control to another control, you have to specify the name of the FrameworkElement you want to validate. You can also set some of the visual appearances properties of the validated control. A major difference against the usual validators is that here you have to bind the validation logic separately. Doing so a clear separation happens between the appearance and the validation. The logic should be declared as a resource. The control can be attached to a ValidatorManager. In this case it can be triggered through the manager too. ValidatorManager The manager is just like the validation summary in ASP.NET. It fires all the validators attached to it and shows the validation errors. IValidationLogic This interface contains the description of the method that performs the validation logic. It is possible to create custom validators by implementing this interface. The method receives the FrameworkElement that should be validated as an argument. Sample Validation Logics Although it is recommended that everybody should create it’s own validation logic satisfying thus it’s own needs, two of the most commonly used validation logics are implemented.


LacisSLValidator Related Software