Silverlight 3 Field Validator

I continue to use Silverlight in their project, ie mainly in projects of the company in which I work. As an architect, chose this technology, but technology is young and rakes here without attachments. Not so long ago stumbled on regular, no validators. Immediately I should mention those that come with version 3, only work in combination with RIA services, but I did not want preview used in a real project and the project is no longer in its infancy. As a result, I tried (honestly) to find a ready solution, but none satisfied. We had to gather ideas, add their own and implement their own control. Another NO. All that is written above applies to work with business objects, types of which "come" from the server. Ie EF via WCF, or something like. Ie situation when their hands touch does not work, partial classes do not help here, because the attributes you need to specify precisely those properties, which is binding, and manually clone each of the properties only to extend the logic of using a validation - not for me. So I wrote this control. Idea is simple, Control TextBox, Combobox, or that otherwise does not matter any FrameworkElement appears as content validation, and then all the logic and configurable. It supports multiple validators in a bundle, ie Required & RegEx for example (a common scenario). I worked on him no more six hours, but is ready and tested by me. While there is Required, RegEx, Range & Custom validators. Course, you can easily expand the list. Generic representation of the states and transitions can also be easily modified to fit your tastes. That's actually all in brief.

Last edited Aug 27, 2009 at 8:30 PM by Valentin78, version 4