MenuItem.SubmenuClosed 事件
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
發生於 IsSubmenuOpen 屬性的狀態變更為 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
事件類型
範例
下列範例示範如何呼叫和處理 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
備註
路由事件資訊
識別碼欄位 | SubmenuClosedEvent |
路由策略 | 鼓 泡 |
代理人 | RoutedEventHandler |