且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

按下/取消按下WPF按钮时的触发事件

更新时间:2023-12-03 20:18:10

您可以从Button派生并覆盖

You can derive from Button and override the OnIsPressedChanged method and fire a custom event there.

或者您可以绑定到ButtonBase.IsPressed 属性.

Or you can bind to the ButtonBase.IsPressed property.