次の方法で共有


MenuItem.OnSubmenuOpened(RoutedEventArgs) メソッド

定義

MenuItem のサブメニューが開かれると呼び出されます。

protected:
 virtual void OnSubmenuOpened(System::Windows::RoutedEventArgs ^ e);
protected virtual void OnSubmenuOpened (System.Windows.RoutedEventArgs e);
abstract member OnSubmenuOpened : System.Windows.RoutedEventArgs -> unit
override this.OnSubmenuOpened : System.Windows.RoutedEventArgs -> unit
Protected Overridable Sub OnSubmenuOpened (e As RoutedEventArgs)

パラメーター

e
RoutedEventArgs

SubmenuOpened イベントのイベント データ。

この例では、 メソッドの使用方法を OnSubmenuOpened 示します。

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

適用対象