ContextMenuService.AddContextMenuClosingHandler 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
新增一個處理者來處理 ContextMenuClosing 附加事件。
public:
static void AddContextMenuClosingHandler(System::Windows::DependencyObject ^ element, System::Windows::Controls::ContextMenuEventHandler ^ handler);
public static void AddContextMenuClosingHandler(System.Windows.DependencyObject element, System.Windows.Controls.ContextMenuEventHandler handler);
static member AddContextMenuClosingHandler : System.Windows.DependencyObject * System.Windows.Controls.ContextMenuEventHandler -> unit
Public Shared Sub AddContextMenuClosingHandler (element As DependencyObject, handler As ContextMenuEventHandler)
參數
- element
- DependencyObject
那個 UIElement 會監聽這個事件的或 ContentElement 。
- handler
- ContextMenuEventHandler
事件處理程式將被加入。