I know I can force reevalution of CanExecute in the view model, however, this requires the view model to register to all related data change events, which might not be always feasible.
Since the commands are only used in the context menu, and during the context menu is open, the data that affect CanExecute cannot be changed, it would be sufficient if CanExecute is reevaluated only when context menu is being opened.
To do this, I can hook up context menu open event and call view model to call RaiseCanExecuteChanged on each ICommand the context menu uses, but it's tedious and anti MVVM. I am wondering if there is an easier way to achieve this?
Yes there is. Use this implementation of ICommand. It reevaluates on each interaction, in your case "Context menu opening". It is not so performance efficient, but if you are not having hundreds of commands then should do the work: