how can u invoke a button mouse click by pressing enter key in mvvm?
I would like to submit a xaml form by pressing enter.
I will describe the problem: Lets assume I have a fiel called: Name, the data in the field is binded to the Name property in the view model. the data is updated in the property only when the textbox looses focus.
mouse click on the button makes the textbox loosing focus, but pressing enter cannot do that. so the result is the the data in the textbox is not updated in the property. therefore I cannot submit my form with pressing enter key, and I cannot use validation tools on my field as well because of this.
what is the solution for this problem?