Are there any performance implications with CanExecuteCommand?

前端 未结 2 859
迷失自我
迷失自我 2021-01-05 18:11

What are the performance implications of using the CanExecuteCommand of the ICommand object. Is the method executed over and over again?

I need to iterate through a

2条回答
  •  执笔经年
    2021-01-05 18:30

    For future googlers: I have created a somewhat different command implementation. For one, it is bound to the OnPropertyChanged event of the ViewModelBase class, but it also allows the View Model to Raise the CanExecuteChanged event for all Command instances within it, regardless of a change in property, such as in the case of a One Way To Source binding scenario. this solution is a part of the PerrypheralFrameowrk.WPF Assembly, available on nuget and codeplex. Look it up. The codeplex wiki has a detailed documentation, and so do the classes in the assembly.

提交回复
热议问题