Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我的 WPF 应用程序使用带有确定和取消按钮的对话框。我想将 Enter 键绑定到 Ok 按钮,将 Esc 键绑定到 Cancel 按钮。似乎这应该是一件简单的事情。
尝试将IsDefault确定按钮上的属性设置为 true,并将IsCancel取消按钮上的属性设置为 true。
IsDefault
IsCancel