Arfender
CanExecuteChanged event
Hey. I am learning how to use Commands in C# and created simple command, to interact with my ViewModel (some notebook manager). If some notebook is selected, adding new note should be possible, if nothing is selected, the button binded with that command should be disabled. I have following code:
In the internet I found information, that
CanExecuteChanged
event should be connected via:
However, my code works fine (the button is enabling/disabling as expected), even when the event is not connected. I am confused. Can somebody explain me why?1 replies