MenuItem.SubmenuOpened 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 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
Event Type
Examples
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
Routed Event Information
Identifier field | SubmenuOpenedEvent |
Routing strategy | Bubbling |
Delegate | RoutedEventHandler |
Applies to
GitHub पर हमारे साथ सहयोग करें
इस सामग्री का स्रोत GitHub पर पाया जा सकता है, जहाँ आप समस्याएँ बना और समीक्षा भी कर सकते हैं और अनुरोध खींच सकते हैं. अधिक जानकारी के लिए, हमारे योगदानकर्ता गाइड देखें.