Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
2385
The CanExecute for ApplicationCommands.Cut
posted

I add a menu item in context menu for a xamDataGrid with following code.

MenuItem item = new MenuItem();

item.IsEnabled = isEnable;

item.Header = "C_ut";

item.Command = ApplicationCommands.Cut;

Sometimes the menu item is enable only when I click a cell with left mouse button.

If I right click a cell to popup the menu directly, it is disabled.  Who know how to solve it?