【问题标题】:MouseLeave in silverlight(Windows Phone 7) getting fired event if mouse hasn't moved out如果鼠标没有移出,silverlight(Windows Phone 7)中的 MouseLeave 会被触发事件
【发布时间】:2011-09-09 03:29:04
【问题描述】:

注册 MouseDown 和 MouseLeave 事件 this.MouseLeftButtonDown += new MouseButtonEventHandler(MainPage_MouseLeftButtonDown); this.MouseLeave += new MouseEventHandler(MainPage_MouseLeave);

点击某处 这两个事件都会被触发。

只有当我移出控件边界时才应该触发 mouseleave 吗?

【问题讨论】:

    标签: silverlight events windows-phone-7


    【解决方案1】:

    因为在基于触摸的屏幕上没有实际的鼠标,所以这种行为是正确的。

    您可能不应该在不使用鼠标的移动应用中使用 mouseLeave。您可能需要这样做的原因有几个,但它们与点击无关。

    【讨论】:

      猜你喜欢
      • 2023-03-21
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多