I have a LostFocus event attached to my TextBox. This TextBox is bound to a ViewModel. However when I lose focus on the TextBox and enter the LostFocus event I find that that the property on the ViewModel has not been updated. It is still showing the old value that I had in the TextBox.
What event should I be using to ensure the ViewModel is updated before I execute any code in my event?
I realise that this might not be normal design, but just to give you some background. I have a grid with dynamic columns that are based on the contexts on the TextBox. I updated these when the TextBox loses focus. I also have a validation rule against the TextBox.
in your Binding something like
make sure yout also have