Freigeben über


MenuItem.SubmenuClosed Ereignis

Definition

Tritt ein, wenn der Zustand der IsSubmenuOpen-Eigenschaft in false geändert wird.

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

Ereignistyp

Beispiele

Die folgenden Beispiele veranschaulichen das Aufrufen und Behandeln des Ereignisses 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

Hinweise

Informationen zum Routingereignis

Bezeichnerfeld SubmenuClosedEvent
Routingstrategie Bubbling
Delegat RoutedEventHandler

Gilt für: