BackstageButtonItem.Command Property

Gets or sets a command fired when the button item is clicked.

Namespace: DevExpress.Xpf.Ribbon

Assembly: DevExpress.Xpf.Ribbon.v20.1.dll

Declaration

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

Property Value

Type Description
ICommand

A ICommand object, fired when the button item is clicked.

Remarks

You can define an action that will happen when the BackstageButtonItem is clicked by setting the Command property. The command must be defined in Window.CommandBindings section in order to make it reusable for different controls. If the Command is a RoutedCommand, you may want to define the BackstageButtonItem.CommandTarget.

The following code shows an example of binding a predefined Paste command to a button:

<dxr:BackstageButtonItem Name ="pasteButton" Content="Paste" Command="ApplicationCommands.Paste" CommandTarget="{Binding ElementName=textBox2}" />

To learn more about commands, see the Commanding Overview and ICommand Interface articles in MSDN.

You can also implement an action for a button via the BackstageItemBase.Click event.

Implements

See Also