I’m new to WPF and have a question among behavior in forms.
I added a key down event to catch a pressed return key.
Now the Problem, there is no visual feedback. Is it possible to let the button look like it got pressed by the mouse?
It should look like i pressed the button via mouse, but instead after pressing return.
If I understand, you want to simulate the visual effect of a button click, so, to achieve this, you have to change the
IsPressedproperty of the button, but is read-only, then,System.Reflectionis useful:on
KeyDownevent:and
KeyUp: