Compartilhar via


ContextMenu.Closed Evento

Definição

Ocorre quando determinada instância de um ContextMenu é fechada.

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

Exemplos

O exemplo a seguir mostra como usar os ContextMenu eventos: Opened e 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

Comentários

Informações de evento encaminhado

Campo Identificador ClosedEvent
Estratégia de roteamento Borbulhando
Delegar RoutedEventHandler

Aplica-se a

Confira também