I’m trying to implement autosave on a text box bound to the Name property of a view model.
I tried putting a timer on the key up event so that it executes the SaveName command if X secs passed after the last key up.
The problem is that the Name property on the VM is only updated when I move out of the text box. If X secs pass and I execute SaveName on the view model, the Name property doesn’t have the changes.
How can I implement this? (other patterns to implement autosave are also welcomed)
Set the
Binding.UpadateSourceTriggertoPropertyChanged, forTextBox.Textit isLostFocusby default.