MenuItem.SubmenuClosed Ereignis

Definition

Tritt ein, wenn der Zustand der IsSubmenuOpen-Eigenschaft in false geändert wird.Occurs when the state of the IsSubmenuOpen property changes to 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 

Beispiele

In den folgenden Beispielen wird das Aufrufen und SubmenuClosed behandeln des-Ereignisses veranschaulicht.The following examples demonstrate calling and handling the SubmenuClosed event.

<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 RoutingereignisRouted Event Information

BezeichnerfeldIdentifier field SubmenuClosedEvent
Routing StrategieRouting strategy BlasenBubbling
delegateDelegate RoutedEventHandler

Gilt für: