Partager via


ContextMenuService.AddContextMenuOpeningHandler Méthode

Définition

Ajoute un gestionnaire pour l'événement attaché 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)

Paramètres

element
DependencyObject

UIElement ou ContentElement qui écoute cet événement.

handler
ContextMenuEventHandler

Gestionnaire d’événements à ajouter.

S’applique à