How do you bind Enter and Esc keys to OK and Cancel buttons respectively in a WPF dialog?

前端 未结 0 1750
鱼传尺愫
鱼传尺愫 2021-02-11 14:41

My WPF app uses a dialog with Ok and Cancel buttons. I would like to bind the Enter key to the Ok button and the Esc key to the Cancel button. Seems like it should be a simple t

相关标签:
回答
  • 消灭零回复
提交回复
热议问题