Compartilhar via


MenuItem.SubmenuClosed Evento

Definição

Ocorre quando o estado da propriedade IsSubmenuOpen é alterado para false.

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

Tipo de evento

Exemplos

Os exemplos a seguir demonstram chamar e manipular o SubmenuClosed evento.

<MenuItem Name="submenu" Header="Menu with Submenu" 
          SubmenuOpened="OnSubmenuOpened"
          SubmenuClosed="OnSubmenuClosed">
private void OnSubmenuClosed(object sender, RoutedEventArgs e)
{
    if (sender == e.Source)
    {
        textBlock1.Text = "Submenu is closed.";
    }
}
Private Sub OnSubmenuClosed(ByVal sender As Object, ByVal e As RoutedEventArgs)
    If sender Is e.Source Then
        textBlock1.Text = "Submenu is closed."
    End If
End Sub

Comentários

Informações de evento encaminhado

Campo Identificador SubmenuClosedEvent
Estratégia de roteamento Borbulhando
Delegar RoutedEventHandler

Aplica-se a