示例#1
0
        public I_AdvanceSearchMenu AddMenu(string header)
        {
            if (Node.ContextMenu == null)
            {
                Node.ContextMenu = new ContextMenu();
            }
            MenuItem menu = new MenuItem();

            menu.Header = header;
            AdvanceSearchMenu advanceSearchMenu = new AdvanceSearchMenu(menu);

            Node.ContextMenu.Items.Add(menu);
            menu.Click += (sender, e) => Menu_Click(sender, e, advanceSearchMenu);
            return(advanceSearchMenu);
        }
示例#2
0
 private void Menu_Click(object sender, RoutedEventArgs e, AdvanceSearchMenu advanceSearchMenu)
 {
     advanceSearchMenu.OnClicked();
 }