I have a WPF application written in C #. This application has dialogs in it. Each of these dialogs has a Save and Cancel button. When the user presses "Enter" on the keyboard, I want to automatically "press" the "Save" button. When the user presses "Esc" on his keyboard, I want to simulate a click on the "Cancel" button. Is there an easy way to do this in WPF?
Thank!
source
share