WPF Menuitem Simulate Click RRS feed

  • Question

  • Hello

    At code behind, I got a MenuItem object, how could I call the click event

    such as menuItem.Click() that will simulate a click on that menuitem, thanks.

    Friday, September 13, 2013 2:39 AM


  • menuItem.RaiseEvent(new RoutedEventArgs(MenuItem.ClickEvent));

    • Marked as answer by Jason Dot Wang Monday, September 23, 2013 11:17 AM
    Friday, September 13, 2013 9:08 AM