NGTweet Part 11– Silverlight 5 UpdateSourceTrigger - by @nileshgule
In one of the earlier post on Data Validation of this NGTweet series I had demonstrated the use of IDataErrorInfo to validate data. While the post was sufficient to demonstrate the use of IDataErrorInfo, there was a slight shortcoming in that implementation. This was due to a limitation in the Silverlight 4 DataBinding. In order to fire the validation, we had to wait till the focus was lost from the text box because the binding fires for textbox control only on lost focus event. This limitation is applicable only in case of Silverlight. WPF supports firing the change notification for databound textbox as soon as the text is entered in the control.
Use UpdateSourceTrigger to update data source
Just to highlight what I said earlier, as you can see from the screenshot below, there is text entered in the textbox. But the send button is not enabled until the focus is lost from the textbox. From usability point of view this is not really user friendly. We would want the send button to be enabled as soon as some text is entered by the user.
Read More from: Original Source
Post Contributed by: Kunal Chowdhury
Kunal is the Site Admin and Contributor of Silverlight-Zone. He is a Software Engineer, Microsoft Silverlight MVP, Code Project Mentor and a Code Project MVP. He is also an active Author in SilverlightShow.net and a speaker in various community events. He works on Microsoft Platform and very passionate about Silverlight technology. He started his career in 2007 and achieved various awards during his professional life.
He shares his findings in his personal blog: http://www.kunal-chowdhury.com and he also tweets at: @kunal2383.