title: How to bind keyboard delete key using MVVM
body: <p>I have a relaycommand in viewmodel.</p>
  
  <pre><code> DeleteCommand = new RelayCommand&lt;Customer&gt;(param =&gt;
    {
   //my code
    });
  </code></pre>
  
  <p>I bind this command to a button, and  i want to bind this to delete key.</p>
  
  <pre><code>&lt;KeyBinding  Key="Delete"
          Command="{Binding DeleteCommand}" CommandParameter="{Binding SelectedItem, ElementName=CustomerListView}"/&gt;
  </code></pre>
  
  <p>It is work on button, but dont work on delete key.</p>
  
  <pre><code>&lt;DataGrid Margin="10" CanUserDeleteRows="False" CellStyle="{StaticResource MaterialDesignDataGridCell}" Height="310" Name="CustomerListView"  filter:DataGridExtensions.UseBackgroundWorkerForFiltering="True"
      filter:DataGridExtensions.IsClearButtonVisible="False" IsReadOnly="True"
     filter:DataGridExtensions.IsFilterVisible="True"
     ColumnHeaderStyle="{StaticResource {ComponentResourceKey 
      TypeInTargetAssembly={x:Type filter:DataGridHeaderFilterControl}, 
      ResourceId=DataGridHeaderFilterControlStyle}}"
      AutoGenerateColumns="False"
      ItemsSource="{Binding Path=CustomerCollection}" &gt;
       &lt;DataGrid.Columns&gt;
        &lt;DataGridTextColumn  Width="100" Header="Code" Binding="{Binding Path=Code}"/&gt;
        &lt;DataGridTextColumn Header="Name" Binding="{Binding Path=Name}" Width="200"/&gt;
        &lt;/DataGrid.Columns&gt;
     &lt;i:Interaction.Triggers&gt;
     &lt;i:EventTrigger EventName="MouseDoubleClick"&gt;
      &lt;command:EventToCommand Command="{Binding EditCommand}" CommandParameter="{Binding SelectedItem, ElementName=CustomerListView}" /&gt;
     &lt;/i:EventTrigger&gt;
    &lt;/i:Interaction.Triggers&gt;
  &lt;/DataGrid&gt;
  </code></pre>