Our goal is to force TextBox to refresh its Text property. Unfortunately normally Text property is refreshed ONLY when TextBox loses focus. This in unacceptable in my case.
There are 2 solutions to this problem. Creating a custom TextBox control or using PRISM and UpdateTextBindingOnPropertyChanged behaviour.
The solution from PRISM is the simplest:
<TextBox>
<i:Interaction.Behaviors>
<behaviors:UpdateTextBindingOnPropertyChanged />
</i:Interaction.Behaviors>
</TextBox>
Custom control can be downloaded here.
No comments:
Post a Comment
If you like this post, please leave a comment :)