MenuItem.SubmenuClosed Event
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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
Event Type
Examples
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
Remarks
Routed Event Information
Identifier field | SubmenuClosedEvent |
Routing strategy | Bubbling |
Delegate | RoutedEventHandler |
Applies to
Colaborați cu noi pe GitHub
Sursa pentru acest conținut poate fi găsită pe GitHub, unde puteți, de asemenea, să creați și să consultați probleme și solicitări de tragere. Pentru mai multe informații, consultați ghidul nostru pentru colaboratori.