MenuItem.OnSubmenuClosed(RoutedEventArgs) 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
在关闭 MenuItem 的子菜单时调用。
protected:
virtual void OnSubmenuClosed(System::Windows::RoutedEventArgs ^ e);
protected virtual void OnSubmenuClosed (System.Windows.RoutedEventArgs e);
abstract member OnSubmenuClosed : System.Windows.RoutedEventArgs -> unit
override this.OnSubmenuClosed : System.Windows.RoutedEventArgs -> unit
Protected Overridable Sub OnSubmenuClosed (e As RoutedEventArgs)
参数
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