Back to Devexpress

CommandItem.Command Property

wpf-devexpress-dot-mvvm-dot-ui-dot-commanditem.md

latest2.8 KB
Original Source

CommandItem.Command Property

Gets or sets the command to execute. This is a dependency property.

Namespace : DevExpress.Mvvm.UI

Assembly : DevExpress.Xpf.Core.v25.2.dll

NuGet Package : DevExpress.Wpf.Core

Declaration

csharp
public ICommand Command { get; set; }
vb
Public Property Command As ICommand

Property Value

TypeDescription
ICommand

The command that should be executed.

|

The following code snippets (auto-collected from DevExpress Examples) contain references to the Command 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.

wpf-bind-gridcontrol-to-dynamic-data/CS/ITypedList/MainWindow.xaml#L28

xml
<dxmvvm:CompositeCommandBehavior>
    <dxmvvm:CommandItem Command="{Binding AddColumnCommand}" />
    <dxmvvm:CommandItem Command="{DXCommand '@e(Grid).PopulateColumns()'}" />

wpf-data-grid-specify-row-visibility-in-viewmodel/CS/CustomFilteringMVVM/MainWindow.xaml#L42

xml
<dxmvvm:CompositeCommandBehavior>
    <dxmvvm:CommandItem Command="{Binding AddExclusionCommand}"/>
    <dxmvvm:CommandItem Command="{DXCommand Execute='@e(grid).RefreshData()'}" />

wpf-scheduler-create-regular-and-recurring-appointments-at-view-model-level/CS/DXApplication14/MainWindow.xaml#L22

xml
<dxmvvm:CompositeCommandBehavior CanExecuteCondition="AnyCommandCanBeExecuted">
    <dxmvvm:CommandItem Command="{Binding AddApptCommand}"
                        CommandParameter="false" />

See Also

CommandItem Class

CommandItem Members

DevExpress.Mvvm.UI Namespace