title: Invoke command on a DataGridcolumn with single-click
body: <p>I would like to create a hyperlink-column in wpf but rather with a command-binding instead of an uri. </p>
  
  <pre><code> &lt;DataGridTemplateColumn Header="{lex:Loc newmaterialnumber}" Width="*"&gt;
                  &lt;DataGridTemplateColumn.CellTemplate&gt;
                      &lt;DataTemplate&gt;
                          &lt;TextBlock TextDecorations="Underline" Text="{Binding NewMaterialnumber}"  Cursor="Hand" VerticalAlignment="Center" HorizontalAlignment="Left"&gt;
                              &lt;TextBlock.InputBindings&gt;
                                  &lt;MouseBinding MouseAction="LeftClick" Command="{Binding DataContext.OpenNewMaterialnumberCommand, RelativeSource={RelativeSource AncestorType={x:Type local:ArticleInfoSearchWindow}}}" /&gt;
                              &lt;/TextBlock.InputBindings&gt;
                          &lt;/TextBlock&gt;
                      &lt;/DataTemplate&gt;
                  &lt;/DataGridTemplateColumn.CellTemplate&gt;
              &lt;/DataGridTemplateColumn&gt;
  </code></pre>
  
  <p>This works great but I have to select the row first before I can click the link. It would be achievable with a datatrigger which sets the row to selected on hover, but I don't really want do select the row on hover. </p>
  
  <p>Any better ideas?</p>