How to show ContextMenu only on WPF DataGridRow
<p>I currently have code that shows a <code>ContextMenu</code> upon right clicking. My problem however stems from the fact that the menu pops up when right clicking anywhere on the <code>DataGrid</code> and not just the rows. Is there anyway to prevent this? i.e., have the <code>ContextMenu</code> pop up only when right clicking a row.</p>

<p>// C#</p>

<pre><code>    private void updateBill(object sender, RoutedEventArgs e) {
        Console.WriteLine("WORKS");
    }
</code></pre>

<p>// XAML</p>

<pre><code>                &lt;DataGrid x:Name="dgCash" HorizontalAlignment="Left" Margin="5,0,5,5" Grid.RowSpan="1" AutoGenerateColumns="False" IsReadOnly="True"
              HorizontalContentAlignment="Right"&gt;
                    &lt;DataGrid.Columns&gt;
                        &lt;DataGridTextColumn Binding="{Binding denomination}" Header="Denomination"/&gt;
                        &lt;DataGridTextColumn Binding="{Binding start}" Header="Starting"/&gt;
                        &lt;DataGridTextColumn Binding="{Binding end}" Header="End of day"/&gt;
                        &lt;DataGridTextColumn Binding="{Binding deposit}" Header="Deposit" Width="*"/&gt;
                    &lt;/DataGrid.Columns&gt;
                    &lt;DataGrid.ContextMenu&gt;
                        &lt;ContextMenu&gt;
                            &lt;MenuItem Header="Update Bill" Click="updateBill" /&gt;
                        &lt;/ContextMenu&gt;
                    &lt;/DataGrid.ContextMenu&gt;
                &lt;/DataGrid&gt;
</code></pre>