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. 附加事件在程式碼中沒有直接處理語法;若要在程式碼中附加路由事件的處理常式, 您可以使用指定的 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 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屬性已從false變更為true此元素上的。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

適用於