Skip to main content

CompositeCommandBehavior.CommandPropertyName Property

Gets or sets the name of the associated control‘s ICommand property. This is a dependency property.

Namespace: DevExpress.Mvvm.UI

Assembly: DevExpress.Xpf.Core.v22.1.dll

NuGet Package: DevExpress.Wpf.Core


public string CommandPropertyName { get; set; }

Property Value

Type Default Description
String Command

The name of the ICommand property.


If the associated control does not have a Command property, assign the CommandPropertyName property to the name of an ICommand property. The behavior binds its CompositeCommand to the specified property.

The following code sample executes a CompositeCommand when a user clicks the ThemedWindow‘s back button:

<dx:ThemedWindow ...
        <dxmvvm:CompositeCommandBehavior CommandPropertyName="NavigateBackCommand">
            <dxmvvm:CommandItem Command="{Binding SaveCommand}"/>
            <dxmvvm:CommandItem Command="{Binding CloseCommand}"/>
    <!-- ... -->
using DevExpress.Mvvm;
using DevExpress.Mvvm.DataAnnotations;
using System.Windows;

public partial class MainViewModel : ViewModelBase {

    public void Save()
      // ...

    public void Close()
      // ...
See Also