Mouse.PreviewMouseMove Mouse.PreviewMouseMove Mouse.PreviewMouseMove Attached Event

定義

發生於滑鼠移到項目上方時。Occurs when the mouse moves over an element.

see AddPreviewMouseMoveHandler, and RemovePreviewMouseMoveHandler
see AddPreviewMouseMoveHandler, and RemovePreviewMouseMoveHandler
see AddPreviewMouseMoveHandler, and RemovePreviewMouseMoveHandler

備註

當滑鼠指標在專案界限中剛移動時, 以及當滑鼠指標移動時, 同時仍留在專案界限內時, 就會發生這個事件。This event occurs both when the mouse pointer is newly moved in the element bounds, and also when the mouse pointer moves while still remaining in the element bounds.

這是附加事件。This is an attached event. WPFWPF將附加事件實作為路由事件。implements attached events as routed events. 附加事件基本上是參考XAMLXAML事件的一種語言概念, 可以在未定義該事件的物件上處理, 這WPFWPF也會讓事件通過路由來進行擴充。Attached events are fundamentally a XAMLXAML language concept for referencing events that can be handled on objects that do not define that event, which WPFWPF expands upon by also enabling the event to traverse a route. 附加事件在程式碼中沒有直接處理語法;若要在程式碼中附加路由事件的處理常式, 您可以使用指定的 Add * 處理常式方法。Attached events do not have a direct handling syntax in code; to attach handlers for a routed event in code, you use a designated Add*Handler method. 如需詳細資訊, 請參閱附加事件總覽For details, see Attached Events Overview.

路由事件資訊Routed Event Information

識別碼欄位Identifier field PreviewMouseMoveEvent
路由策略Routing strategy 建立Tunneling
Delegate - 委派Delegate MouseEventHandler

適用於