title: How to return number of selected rows in datagrid to textbox in WPF?
body: <p>I would like to select multiple rows (not necessarily in any particular order) and return number of selected rows to the textbox.</p>
  
  <p>Something like:
  You have selected 'x' rows.</p>
  
  <p>I was trying to use this kind of method:</p>
  
  <pre class="lang-cs prettyprint-override"><code>private void SelectedRows(object sender, SelectionChangedEventArgs e)
  {
      var selectedRows = SomeDataGrid.SelectedRows.Count.ToString();
      RowCount.Text = "You have selected " + selectedRows + "rows";
  }
  </code></pre>
  
  <p>but to no avail.
  There was an error saying that DataGrid do not contain SelectedRow definition.</p>