The Click.Command attached property provided by Composite Application Guidance for WPF & Silverlight requires you to specify an
ICommand (generally using DelegateCommand class). In that command you define an
Execute and CanExecute method. The CAL relies on this latter method to check if the command can be executed and sets the control's
IsEnabled property to the value returned by the CanExecute method.
So, when you use CAL's Click attached property to define commands, the
IsEnabled property is set at runtime by the command behavior (more precisely in the
UpdateEnabledState method of the CommandBehaviorBase class) which is executed after the
isEnabled set in XAML.
virtual void UpdateEnabledState()
if (this.Command !=
You can use the
RaiseCanExecuteChanged method from the DelegateCommand class to reevalute
the CanExecute method and that will update the isEnabled property of all attached controls.
Please let me know if this helps.