WPF - How to force a Command to re-evaluate 'CanExecute' via its CommandBindings

Not the prettiest in the book, but you can use the CommandManager to invalidate all commandbinding:

CommandManager.InvalidateRequerySuggested();
http://stackoverflow.com/questions/1340302/wpf-how-to-force-a-command-to-re-evaluate-canexecute-via-its-commandbindings
http://msdn.microsoft.com/en-us/library/system.windows.input.commandmanager.invalidaterequerysuggested.aspx
posted @ 2013-10-05 11:13  xiaokang088  阅读(460)  评论(0编辑  收藏  举报