title: datagrid mouse double click event wpf
body: <p>I have created an application using WPF. I have shown some data in the data grid. Currently, I have used selection changed event for getting the data from the data grid. I have following code</p>
  
  <pre><code>private void datagrid1_SelectionChanged(object sender, SelectionChangedEventArgs e)
          {
              DataGrid dg = sender as DataGrid;
              DataRowView dr = dg.SelectedItem as DataRowView;
              if (dr != null)
              {
                  int id = Convert.ToInt32(dr["Id"].ToString());
             }
  }
  </code></pre>
  
  <p>I need to get data only when the user doubles click on the data grid. how is it possible?</p>