CoreIndependentInputSource.PointerRoutedTo 事件

定义

当捕获的指针输入之前传递到另一个对象,转换为传递到此对象时发生。

// Register
event_token PointerRoutedTo(TypedEventHandler<ICorePointerRedirector, PointerEventArgs const&> const& handler) const;

// Revoke with event_token
void PointerRoutedTo(event_token const* cookie) const;

// Revoke with event_revoker
CoreIndependentInputSource::PointerRoutedTo_revoker PointerRoutedTo(auto_revoke_t, TypedEventHandler<ICorePointerRedirector, PointerEventArgs const&> const& handler) const;
public event TypedEventHandler<ICorePointerRedirector,PointerEventArgs> PointerRoutedTo;
function onPointerRoutedTo(eventArgs) { /* Your code */ }
coreIndependentInputSource.addEventListener("pointerroutedto", onPointerRoutedTo);
coreIndependentInputSource.removeEventListener("pointerroutedto", onPointerRoutedTo);
- or -
coreIndependentInputSource.onpointerroutedto = onPointerRoutedTo;
Public Custom Event PointerRoutedTo As TypedEventHandler(Of ICorePointerRedirector, PointerEventArgs) Implements PointerRoutedTo

事件类型

实现

Windows 要求

设备系列
Windows 11 (在 10.0.22000.0 中引入)
API contract
Windows.Foundation.UniversalApiContract (在 v14.0 中引入)

注解

如果首先对输入对象触发 PointerRoutedTo 事件,则不会为关联的指针触发 CoreIndependentInputSource.PointerPressed 事件。

适用于

另请参阅