Mouse.MouseLeave Mouse.MouseLeave Mouse.MouseLeave Attached Event


發生於滑鼠指標離開項目的範圍時。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. 附加的事件並沒有直接處理語法在程式碼若要附加的程式碼中的路由事件處理常式,您會使用指定的新增 * 處理常式方法。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屬性值已從truefalse這個項目上。Although 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 - 委派Delegate MouseEventHandler