【发布时间】:2011-10-15 09:54:51
【问题描述】:
我目前正在使用Mouse.OverrideCursor = Cursors.Wait 显示忙碌/等待光标。但是当等待光标打开时,它仍然能够识别在那段时间发生的鼠标点击。有什么办法可以禁用鼠标点击吗?
【问题讨论】:
标签: wpf click wait mouse-cursor
我目前正在使用Mouse.OverrideCursor = Cursors.Wait 显示忙碌/等待光标。但是当等待光标打开时,它仍然能够识别在那段时间发生的鼠标点击。有什么办法可以禁用鼠标点击吗?
【问题讨论】:
标签: wpf click wait mouse-cursor
this.IsHitTestVisible = false;
但更优雅的解决方案是(假设您使用 MVVM 模式)在 RelayCommand CanExecute 方法中拒绝鼠标点击。
【讨论】: