ContextMenuService.AddContextMenuOpeningHandler 方法

定义

ContextMenuOpening 附加事件添加处理程序。

public:
 static void AddContextMenuOpeningHandler(System::Windows::DependencyObject ^ element, System::Windows::Controls::ContextMenuEventHandler ^ handler);
public static void AddContextMenuOpeningHandler (System.Windows.DependencyObject element, System.Windows.Controls.ContextMenuEventHandler handler);
static member AddContextMenuOpeningHandler : System.Windows.DependencyObject * System.Windows.Controls.ContextMenuEventHandler -> unit
Public Shared Sub AddContextMenuOpeningHandler (element As DependencyObject, handler As ContextMenuEventHandler)

参数

element
DependencyObject

侦听此事件的 UIElementContentElement

handler
ContextMenuEventHandler

要添加的事件处理程序。

适用于