Mouse.MouseEnter Mouse.MouseEnter Mouse.MouseEnter Attached Event


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

see AddMouseEnterHandler, and RemoveMouseEnterHandler
see AddMouseEnterHandler, and RemoveMouseEnterHandler
see AddMouseEnterHandler, and RemoveMouseEnterHandler


這是附加的事件。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 are not raised along 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屬性已從falsetrue這個項目上。Although this event is used to track when the mouse enters an element, it is also reporting the IsMouseOver property has changed from false to true on this element.

路由事件資訊Routed Event Information

識別項欄位Identifier field MouseEnterEvent
路由策略Routing strategy 直接Direct
Delegate - 委派Delegate MouseEventHandler