title: wpf datagrid alternate row coloring
body: <p>I have tried this method..   without luck..</p>
  
  <pre><code> &lt;Style TargetType="{x:Type DataGridRow}"&gt;
    &lt;Style.Triggers&gt;
        &lt;Trigger Property="ItemsControl.AlternationIndex" Value="0"&gt;
            &lt;Setter Property="Foreground" Value="Red" /&gt;
       &lt;/Trigger&gt;
    &lt;/Style.Triggers&gt;
  &lt;/Style&gt;
  </code></pre>
  
  <p>Is there a way to get the row Index?
  I have even tried</p>
  
  <pre><code>&lt;DataTrigger Binding="{Binding AlternationIndex}" Value="0"&gt;
      &lt;Setter Property="Foreground" Value="Green"&gt;&lt;/Setter&gt;
  &lt;/DataTrigger&gt;
  </code></pre>