ContentElement.OnIsMouseDirectlyOverChanged(DependencyPropertyChangedEventArgs) 方法


当针对此元素引发未处理的 IsMouseDirectlyOverChanged 事件时调用。Invoked when an unhandled IsMouseDirectlyOverChanged event is raised on this element. 实现此方法可为此事件添加类处理。Implement this method to add class handling for this event.

 virtual void OnIsMouseDirectlyOverChanged(System::Windows::DependencyPropertyChangedEventArgs e);
protected virtual void OnIsMouseDirectlyOverChanged (System.Windows.DependencyPropertyChangedEventArgs e);
abstract member OnIsMouseDirectlyOverChanged : System.Windows.DependencyPropertyChangedEventArgs -> unit
override this.OnIsMouseDirectlyOverChanged : System.Windows.DependencyPropertyChangedEventArgs -> unit
Protected Overridable Sub OnIsMouseDirectlyOverChanged (e As DependencyPropertyChangedEventArgs)



IsMouseDirectlyOver 依赖项属性的值更改其值时,将引发此虚方法。This virtual method is raised when the value of the IsMouseDirectlyOver dependency property changes its value. 首先引发虚方法,并在必要时对事件数据进行操作。The virtual method is raised first and can manipulate the event data as necessary. 然后 IsMouseDirectlyOverChanged ,将用相同的事件数据实例引发该事件。Then the IsMouseDirectlyOverChanged event is raised with that same event data instance. 请注意,该 IsMouseDirectlyOverChanged 事件不是路由事件。Notice that the IsMouseDirectlyOverChanged event is not a routed event. 因此,不能在类处理程序中将其标记为已处理。Therefore, you cannot mark it as handled in the class handler.

此方法没有默认实现。This method has no default implementation. 因为继承中的中间类可能实现此方法,所以建议您在实现中调用基实现。Because an intermediate class in the inheritance might implement this method, we recommend that you call the base implementation in your implementation. 您可以根据自己的要求,在特殊处理之前或之后调用 base。You may call base either before or after your special handling, depending on your requirements.