I want to execute a command in my viewmodel when the user presses enter in a TextBox. The command works when bound to a button.
I know I am late to the party, but I got this to work for me. Try using Key="Return"
instead of Key="Enter"
Here is the full example
Make sure to use UpdateSourceTrigger=PropertyChanged
in your binding, otherwise the property will not be updated until focus is lost, and pressing enter will not lose focus...
Hope this was helpful!