Mouse.MouseLeave 附加事件


發生於滑鼠指標離開項目的範圍時。Occurs when the mouse pointer leaves the boundaries of an element.

see AddMouseLeaveHandler, and RemoveMouseLeaveHandler
see AddMouseLeaveHandler, and RemoveMouseLeaveHandler
see AddMouseLeaveHandler, and RemoveMouseLeaveHandler


這是附加事件。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.

此事件使用直接事件處理路由策略。This event uses the direct event handling routing strategy. 直接路由事件不會遵循路由, (它們只會在引發) 的相同元素中處理。Direct routed events do not follow a route (they are only handled in the same element on which they are raised). 不過,它們會啟用路由事件行為的其他層面,例如樣式中的事件觸發程式。They do, however, enable other aspects of routed event behaviors, such as event triggers in styles.

雖然此事件是用來追蹤當滑鼠離開專案的時間,但它也會報告 IsMouseOver 屬性值已從變更 true 為這個專案上的 falseAlthough this event is used to track when the mouse leaves an element, it is also reporting that the IsMouseOver property value has changed from true to false on this element.

路由事件資訊Routed Event Information

識別碼欄位Identifier field MouseLeaveEvent
路由策略Routing strategy 直接Direct
代理人Delegate MouseEventHandler