UIElement.OnIsMouseDirectlyOverChanged 方法
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
当针对此元素引发未处理的 IsMouseDirectlyOverChanged 事件时调用。 实现此方法可为此事件添加类处理。
protected:
virtual void OnIsMouseDirectlyOverChanged(System::Windows::DependencyPropertyChangedEventArgs e);
C#
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 将引发此虚拟方法。 首先引发虚拟方法,并且可以根据需要操作事件数据。 然后,使用 IsMouseDirectlyOverChanged 同一事件数据实例引发该事件。 请注意,该 IsMouseDirectlyOverChanged 事件不是路由事件。 因此,不能在类处理程序中将其标记为已处理。
此方法没有默认实现。 由于继承中的中间类可能实现此方法,因此建议在实现中调用基实现。 可以在特殊处理之前或之后调用 base,具体取决于你的要求。
产品 | 版本 |
---|---|
.NET Framework | 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1 |
Windows Desktop | 3.0, 3.1, 5, 6, 7, 8, 9, 10 |