MenuBase.OnMouseLeave(MouseEventArgs) 方法

定义

为鼠标离开控件时发生的 MouseLeave 路由事件提供类处理。Provides class handling for the MouseLeave routed event that occurs when the mouse leaves the control.

protected:
 override void OnMouseLeave(System::Windows::Input::MouseEventArgs ^ e);
protected override void OnMouseLeave (System.Windows.Input.MouseEventArgs e);
override this.OnMouseLeave : System.Windows.Input.MouseEventArgs -> unit
Protected Overrides Sub OnMouseLeave (e As MouseEventArgs)

参数

e
MouseEventArgs

MouseLeave 事件的事件数据。The event data for the MouseLeave event.

注解

此实现不会更改Handled MouseLeave事件数据的已处理状态 (属性)。This implementation does not change the handled state (the Handled property) of the MouseLeave event data.

继承者说明

如果重写OnMouseLeave(MouseEventArgs), 请始终OnMouseLeave(MouseEventArgs)在实现中调用基实现。If you override OnMouseLeave(MouseEventArgs), always call the base implementation in your OnMouseLeave(MouseEventArgs) implementation. 未能调用基实现会阻止基类使用类处理程序来处理事件, 这可能会更改最终类的运行时行为。Failure to call the base implementation prevents base classes from handling the event with a class handler, which might change the run-time behavior of the final class. 你可以在特殊处理之前或之后调用基本实现, 具体取决于你的要求。You can call the base implementation either before or after your special handling, depending on your requirements.

适用于