Partager via


MenuItem.SubmenuClosed Événement

Définition

Se produit lorsque l'état de la propriété IsSubmenuOpen devient 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 

Type d'événement

Exemples

Les exemples suivants illustrent l’appel et la gestion de l’événement SubmenuClosed .

<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

Remarques

Informations sur les événements acheminés

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

S’applique à