开发者

Are there any common techniques for validating form data on the view within a Windows Phone 7 Silverlight applications?

I am working on a W开发者_如何转开发indows Phone 7 application and I'd like to know if there are any common ways to implement validation on the form. Some simple examples would be really helpful. I'd love to see something that uses data annotations, but I don't believe that's supported in Silverlight 3 (and thus WP7). To be clear, I'm looking for things like, required field, max length, etc.


From what I can see WP7 Siverlight does not support DataAnnotations (which is how I do my OOB SL4 apps) and the Validationstates for the textbox control do not seem to work. I check the exception in my Set action and throw an error. You could then handle the event (and display feedback to the user) but it seems as though this is not supported in the shipped features - very strange!

If you enter bad data it just seems to ignore it completely....

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜