Show menu programmatically in WPF

后端 未结 4 1838
名媛妹妹
名媛妹妹 2020-12-17 09:57

How can I open menu (System.Windows.Controls.Menu) programmatically in WPF?

4条回答
  •  感动是毒
    2020-12-17 10:46

    void CmsBox_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
    {
        box = sender as WpfBox;
        ContextMenu cms = new ContextMenu();
        e.Handled = true;
        ...
    }
    

提交回复
热议问题