How is "Esc" key handled in WPF Window?
- by Markus2k
I want the Escape key to close my WPF window. However if there is a control that can consume that Escape key, I don't want to close the Window. There are multiple solutions on how to close the WPF Window when ESC key is pressed. eg. http://stackoverflow.com/questions/419596/how-does-the-wpf-button-iscancel-property-work
However this solution closes the Window, without regard to if there is an active control that can consume the Escape key.