Live binding property change for textbox [duplicat

2019-06-25 23:47发布

This question already has an answer here:

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.

1条回答
Explosion°爆炸
2楼-- · 2019-06-26 00:44

Change UpdateSourceTrigger on the binding to PropertyChanged.

查看更多
登录 后发表回答