Compartir a través de


ContextMenu.Closed Evento

Definición

Se produce cuando se cierra una instancia determinada de un 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 

Tipo de evento

Ejemplos

En el ejemplo siguiente se muestra cómo usar los ContextMenu eventos : Opened y 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

Comentarios

Información sobre eventos enrutados

Campo identificador ClosedEvent
Estrategia de enrutamiento Burbujeante
Delegado RoutedEventHandler

Se aplica a

Consulte también