Please accept my apology for the delayed response and for the misunderstanding. The issue you are facing is not a bug since it is the expected behavior when using CAL
attached property provided by Composite Application Guidance
for Silverlight requires you to specify an ICommand
(generally using DelegateCommand
class). In that command you define an Execute
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. That is why when you set the IsEnabled
property in XAML
, it gets overriden with the command's value.
So, when you bound a command to a control the beheaviour is as follows (independently from the value you set to the IsEnabled property in XAML):
- If the command's CanExecute method returns false: the control will be disabled.
- If the command's CanExecute method returns true: the control will be enabled.
So, when you use CAL
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
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.
I hope the information will help you. Let us know if we can further assist you.
the Telerik team
Do you want to have your say when we set our development plans?
Do you want to know when a feature you care about is added or when a bug fixed?
Telerik Public Issue Tracking
system and vote to affect the priority of the items