How to: specify a Command and KeyGesture for a bar item
This example shows how to specify a command and custom short cut for a bar item. A command and short cut are assigned to the item via the BarItem.Command and BarItem.KeyGesture properties, respectively.In the example, a bar is docked to the BarContainerControl which is created manually.
Note
A complete sample project is available at https://github.com/DevExpress-Examples/how-to-bind-a-bar-item-to-a-command-and-provide-a-keygesture-for-the-item-e1550.
<dxb:BarManager.Items>
<dxb:BarButtonItem Name="btnCut" Command="ApplicationCommands.Cut" KeyGesture="CTRL+1" CommandTarget="{Binding ElementName=textBox}" Content="{Binding Command.Text, RelativeSource={RelativeSource Self}}" />
</dxb:BarManager.Items>