CommandManager.InvalidateRequerySuggested() isn't fast enough. What can I do?

后端 未结 7 511
南笙
南笙 2020-11-30 18:09

Short Version

Calls to CommandManager.InvalidateRequerySuggested() take far longer to take effect than I would like (1-2 second delay

7条回答
  •  醉酒成梦
    2020-11-30 18:28

    Just to clarify:

    1. You want to fire an update of CanExecute when Command property changed
    2. Create your own binding class that detect changes in the Command property and then calls RaiseCanExecuteChanged()
    3. Use this binding in CommandParameter

    Worked for me.

提交回复
热议问题