HandledMouseEventArgs.Handled 属性
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
获取或设置是否应将此事件转发到控件的父容器。
public:
property bool Handled { bool get(); void set(bool value); };
public bool Handled { get; set; }
member this.Handled : bool with get, set
Public Property Handled As Boolean
属性值
如果鼠标事件应转到父控件,则为 true
;否则为 false
。
示例
下面的代码示例演示如何将鼠标滚轮事件标记为在自定义控件中处理。
Public Class MouseWheelControl
Sub New()
' Add initialization code for the control here.
End Sub
Protected Sub MouseWheelControl_MouseWheel(ByVal sender As Object, ByVal e As MouseEventArgs) Handles Me.MouseWheel
Dim Hme As HandledMouseEventArgs = e
Hme.Handled = True
' Perform custom mouse wheel action here.
End Sub
End Class