I have a ContextMenu whose items are all bound to commands and enable\disable correctly after ANY Command is invoked from another source but prior to, they are all disabled. So if I run the app, all the MenuItems are disabled but if I invoke any of the bound commands from another source (buttons, for instance) they become synchronized with the CanExecute code. I have no idea how to debug this. Any thought would be helpful!?!
views:
214answers:
1
+1
A:
Sometimes you need to force WPF to re-evaluate whether commands are enabled or not.
Somewhere in your code, add a call to:
CommandManager.InvalidateRequerySuggested();
See if that helps.
Adel Hazzah
2010-03-13 19:27:02
Thanks Adel, appreciate you taking the time. I've tried various locations with no joy.
Brad
2010-03-13 20:41:44