I have tried this method.. without luck..
<Style TargetType="{x:Type DataGridRow}">
<Style.Triggers>
<Trigger Property="ItemsControl.AlternationIndex" Value="0">
<Setter Property="Foreground" Value="Red" />
</Trigger>
</Style.Triggers>
</Style>
Is there a way to get the row Index?
I have even tried
<DataTrigger Binding="{Binding AlternationIndex}" Value="0">
<Setter Property="Foreground" Value="Green"></Setter>
</DataTrigger>
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…