CompositeCommandBehavior.CanExecuteCondition Property
Specifies whether the CompositeCommand can be executed if any of its inner commands can be executed.
Namespace: DevExpress.Mvvm.UI
Assembly: DevExpress.Xpf.Core.v20.1.dll
NuGet Packages: DevExpress.WindowsDesktop.Wpf.Core, DevExpress.Wpf.Core
Declaration
Property Value
Type | Description |
---|---|
CompositeCommandExecuteCondition | Any of the CompositeCommandExecuteCondition enumeration values. |
Available values:
Name | Description |
---|---|
AllCommandsCanBeExecuted | The CompositeCommand can be executed only if all of its inner commands can be executed. |
AnyCommandCanBeExecuted | The CompositeCommand can be executed if any of its inner commands can be executed. |
Remarks
Set the CanExecuteCondition property to AllCommandsCanBeExecuted to allow the CompositeCommand execution only when all of its inner commands can be executed (the CommandItem.CanExecute property is set to true).
When the CanExecuteCondition property is set to AnyCommandCanBeExecuted, the CompositeCommand can be executed when at least one of its inner commands can be executed (the CommandItem.CanExecute property is set to true).
Related GitHub Examples
The following code snippet (auto-collected from DevExpress Examples) contains a reference to the CanExecuteCondition property.
Note
The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.