WPF - Command in MenuItem in DataTemplate
I have a DataTemplate containing an image. For the image, I added a ContextMenu with a MenuItem. To MenuItem I have linked a command. Then I process the command in the view using the DataTemplate.
In the CanExecute handler, I have e.CanExecute = true. But the Executed handler is never executed. If I remove the assignment of the MenuItem command, the menu is shown correctly when I right clicked on the image.
What am I doing wrong?
Thanks!
-2
a source to share