【问题标题】:Disable mouse clicks on displaying busy/wait cursor in WPF禁用鼠标单击在 WPF 中显示忙/等待光标
【发布时间】:2011-10-15 09:54:51
【问题描述】:

我目前正在使用Mouse.OverrideCursor = Cursors.Wait 显示忙碌/等待光标。但是当等待光标打开时,它仍然能够识别在那段时间发生的鼠标点击。有什么办法可以禁用鼠标点击吗?

【问题讨论】:

    标签: wpf click wait mouse-cursor


    【解决方案1】:
    this.IsHitTestVisible = false;
    

    但更优雅的解决方案是(假设您使用 MVVM 模式)在 RelayCommand CanExecute 方法中拒绝鼠标点击。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2011-01-08
      • 1970-01-01
      • 1970-01-01
      • 2011-11-12
      • 1970-01-01
      • 1970-01-01
      • 2013-10-23
      相关资源
      最近更新 更多