Is IsEnabled binding optional for command binding?

I noticed that the following code:

<Button Content="_Timbres..." 
    Command="{Binding Path=ShowTimbresCommand}" 
    IsEnabled="{Binding Path=CanExecuteShowTimbresCommand}"/>

behaves the same as:

<Button Content="_Timbres..." 
    Command="{Binding Path=ShowTimbresCommand}">

The value that CanExecuteShowTimbresCommand is automatically bound to the IsEnabled property. Is this true and why?

+5
source share
1 answer

Typically, host controls Commandwill be set IsEnabledto false, if the command CanExecuteis equal false, that is all that is associated with it.

MSDN :

- , . [...] CanExecuteChanged , CanExecute false , CanExecute true.

+10

All Articles