title: WPF pass DataGrid selected row as command parameter
body: <ol>
  <li><strong>MainWindowViewModel</strong> has a <strong>ViewCustomerCommand(string id)</strong> command that shows a customer by id</li>
  <li><strong>MainWindow.xaml</strong> containing TabControl</li>
  <li>TabControl has a UserControl that contains DataGrid that is bind to Customers collection<br>
  | id | customer |</li>
  </ol>
  
  <p>How do I pass "id" column in DataGrid selected row as a command parameter in <strong>MainWindow.xaml</strong></p>
  
  <pre><code>MainWindow.xaml
      &lt;Button Command="{Binding ViewCustomerCommand}" CommandParameter="??? how to pass id of selected customer ???" /&gt;
  </code></pre>