Condividi tramite


MenuItem.SubmenuClosed Evento

Definizione

Si verifica quando lo stato della proprietà IsSubmenuOpen si modifica in 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 evento

Esempio

Gli esempi seguenti illustrano la chiamata e la gestione dell'evento 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

Commenti

Informazioni evento indirizzato

Campo Identificatore SubmenuClosedEvent
Strategia di routing Bubbling
Delegato RoutedEventHandler

Si applica a