开发者

Live binding property change for textbox [duplicate]

开发者 https://www.devze.com 2023-03-31 00:11 出处:网络
This question already has answers here: TextBox and default Button binding does update too late (3 answers)
This question already has answers here: TextBox and default Button binding does update too late (3 answers) Closed 5 years ago.

I have a TextBox control on my form that is bound to a property in my view model. The current behaviour works in a way that the view model will only get notified that the text in the TextBox was modified after the control loses focus.

How can I inform my view model whenever the TextBox开发者_开发问答 changes state in real time? This is attached to a property in my view model that determines if the save button is enabled. So if I type one letter into this TextBox right away my save button should be enabled without having to lose focus.


Change UpdateSourceTrigger on the binding to PropertyChanged.

0

精彩评论

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