共用方式為


InputPointerSource.PointerMoved 事件

定義

當指標在這個 InputPointerSource的範圍內移動時發生。

// Register
event_token PointerMoved(TypedEventHandler<InputPointerSource, PointerEventArgs const&> const& handler) const;

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

// Revoke with event_revoker
InputPointerSource::PointerMoved_revoker PointerMoved(auto_revoke_t, TypedEventHandler<InputPointerSource, PointerEventArgs const&> const& handler) const;
public event TypedEventHandler<InputPointerSource,PointerEventArgs> PointerMoved;
function onPointerMoved(eventArgs) { /* Your code */ }
inputPointerSource.addEventListener("pointermoved", onPointerMoved);
inputPointerSource.removeEventListener("pointermoved", onPointerMoved);
- or -
inputPointerSource.onpointermoved = onPointerMoved;
Public Custom Event PointerMoved As TypedEventHandler(Of InputPointerSource, PointerEventArgs) 

事件類型

備註

滑鼠和手寫筆裝置會比觸控更頻繁地引發 PointerMoved 事件。 只有在手指觸碰表面時,才能偵測到觸控點,而滑鼠具有一律可見的螢幕游標,即使沒有按下滑鼠按鍵,手寫筆也可以停留在數位板介面上,而不接觸它。

滑鼠輸入與第一次偵測到滑鼠輸入時指派的單一指標相關聯,而且所有滑鼠起始的互動都有相同的 PointerId。 按一下滑鼠按鈕 (左鍵、滾輪或右鍵) 會透過 PointerPressed 事件建立指標與該按鈕的次要關聯。 只在放開相同的滑鼠按鈕時才會觸發 PointerReleased 事件 (這個事件完成前,沒有其他按鈕可以與該指標關聯)。 由於這個專屬關聯的關係,其他滑鼠按鈕的按一下都會經由 PointerMoved 事件進行路由。

適用於