FrameworkContentElement.ToolTipOpening 事件

定義

任何元素的工具提示開啟時發生。Occurs when any tooltip on the element is opened.

public:
 event System::Windows::Controls::ToolTipEventHandler ^ ToolTipOpening;
public event System.Windows.Controls.ToolTipEventHandler ToolTipOpening;
member this.ToolTipOpening : System.Windows.Controls.ToolTipEventHandler 
Public Custom Event ToolTipOpening As ToolTipEventHandler 

備註

若要手動開啟工具提示,事件的處理常式應該將相關事件標示為已處理。To manually open tooltips, handlers of the events should mark the relevant event as handled. 否則,ToolTip 屬性的值將會用來自動開啟內容功能表。Otherwise, the value of the ToolTip property will be used to automatically open a context menu. 將事件標示為已處理,會有效地取消預設動作,而且可能會有機會重設 ToolTip 屬性的值,然後開啟新的 ContextMenuMarking the event handled will effectively cancel the default action, and could be an opportunity to reset the value of the ToolTip property and then open the new ContextMenu. 請注意,如果 ToolTip 是 null 參考或未設定,則不會引發此事件。Note that this event will not be raised if ToolTip is a null reference or otherwise unset.

這個事件不可以是樣式中的 EventTriggerThis event cannot be an EventTrigger in a style. 這是因為此事件的 [識別碼] 欄位會重新使用服務的執行,而不會對事件公開新增/移除方法。This is because the identifier field of this event re-uses an implementation from a service that does not expose add/remove methods on the event.

路由事件資訊Routed Event Information

識別碼欄位Identifier field ToolTipOpeningEvent
路由策略Routing strategy 直接Direct
Delegate - 委派Delegate ToolTipEventHandler

適用於