MenuItem.SubmenuOpened Event

Definition

Se produce cuando el estado de la propiedad IsSubmenuOpen cambia a true.Occurs when the state of the IsSubmenuOpen property changes to 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 

Examples

En los siguientes ejemplos se muestra cómo llamar a y controlar el evento SubmenuOpened.The following examples demonstrate calling and handling the SubmenuOpened event.

<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

Remarks

Información sobre eventos enrutadosRouted Event Information

Campo de identificadorIdentifier field SubmenuOpenedEvent
Estrategia de enrutamientoRouting strategy PropagaciónBubbling
delegadoDelegate RoutedEventHandler

Applies to