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 |