开发者

Silverlight 4 Textbox validation only after change

开发者 https://www.devze.com 2023-03-19 20:24 出处:网络
Im developing a solution in Silverlight 4 with RIA Services.I am using data annotations on my entity to describe validation.I can see these are reflected on the client side code after building.I have

Im developing a solution in Silverlight 4 with RIA Services. I am using data annotations on my entity to describe validation. I can see these are reflected on the client side code after building. I have a child window which has textboxes bound to a single entity record for editing. The data annotation i have on all the textboxes is the annotation but this does not ever fire until a user has editted a textbox f开发者_如何学Pythonirst, left the textbox, re-entered the textbox and then deletes the content. This has no use if i am trying to force someone to fill in a textbox as they may skip straight over the textbox with the required data annotation.

Am i missing something simple here?

Thanks in advance


I have been using this very effective solution without any issues in both SL3, 4 and 5, thanks to Thomas Claudius Huber: http://www.thomasclaudiushuber.com/blog/2009/07/17/here-it-is-the-updatesourcetrigger-for-propertychanged-in-silverlight/

0

精彩评论

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

关注公众号