語言

InputPointerSource.PointerMoved 事件

定義

當指標在該 輸入來源範圍內移動時,會發生這種情況。

// 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 事件,在指標與該按鈕之間建立次要關聯。 PointerReleases事件僅在放開同一個滑鼠按鈕時觸發(此事件完成前,指標不能有其他按鈕關聯)。 由於這種專屬關聯,其他滑鼠按鈕點擊會經過 PointerMoved 事件。

適用於