Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Live binding property change for textbox [duplicate]

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.

like image 484
gcso Avatar asked Dec 21 '22 09:12

gcso


1 Answers

Change UpdateSourceTrigger on the binding to PropertyChanged.

like image 50
H.B. Avatar answered Dec 24 '22 02:12

H.B.