Partager via


ContextMenu.Closed Événement

Définition

Se produit à la fermeture d'une instance particulière de ContextMenu.

public:
 event System::Windows::RoutedEventHandler ^ Closed;
public event System.Windows.RoutedEventHandler Closed;
member this.Closed : System.Windows.RoutedEventHandler 
Public Custom Event Closed As RoutedEventHandler 

Type d'événement

Exemples

L’exemple suivant montre comment utiliser les ContextMenu événements : Opened et Closed.

<ContextMenu Name="cm" Opened="OnOpened" Closed="OnClosed" StaysOpen="true">
void OnOpened(object sender, RoutedEventArgs e)
{
    cmButton.Content = "The ContextMenu Opened";
}
void OnClosed(object sender, RoutedEventArgs e)
{
    cmButton.Content = "The ContextMenu Closed";
}
Private Sub OnOpened(ByVal sender As Object, ByVal args As RoutedEventArgs)
    cmButton.Content = "The ContextMenu Opened"
End Sub

Private Sub OnClosed(ByVal sender As Object, ByVal args As RoutedEventArgs)
    cmButton.Content = "The ContextMenu Closed"
End Sub

Remarques

Informations sur les événements acheminés

Champ Identificateur ClosedEvent
Stratégie de routage Bouillonnant
Délégué RoutedEventHandler

S’applique à

Voir aussi