Partager via


MenuItem.SubmenuOpened Événement

Définition

Se produit lorsque l'état de la propriété IsSubmenuOpen devient true.

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

Type d'événement

Exemples

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

<MenuItem Name="submenu" Header="Menu with Submenu" 
          SubmenuOpened="OnSubmenuOpened"
          SubmenuClosed="OnSubmenuClosed">
private void OnSubmenuOpened(object sender, RoutedEventArgs e)
{

    if (sender == e.Source)
    {
        textBlock1.Text = "Submenu is open.";
    }
}
Private Sub OnSubmenuOpened(ByVal sender As Object, ByVal e As RoutedEventArgs)

    If sender Is e.Source Then
        textBlock1.Text = "Submenu is open."
    End If
End Sub

Remarques

Informations sur les événements acheminés

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

S’applique à