Hi,
I have a data bound XamDataGrid with a custom style. Now I want to use the grid's feature to alternate the row background. I've wrote a custom Style for the DataRecordCellArea where i've set the BackgroundAlternate DependencyProperty. Now my Row Background is alternating. I've also set Foreground Property in this style but it only affects the "non alternating" rows.
How do I set the Foreground Brush of the Alternating Rows? I want it to be the same as the "non alternating" ones.
<igWPF:XamDataGrid.Resources> <Style x:Key="CustomForeground"> <Setter Property="TextElement.Foreground" Value="red" /> </Style> <Style TargetType="{x:Type igWPF:DataRecordCellArea}"> <Style.Setters> <Setter Property="Background" Value="AliceBlue" /> <Setter Property="BackgroundAlternate" Value="Beige" /> </Style.Setters> </Style> <Style TargetType="{x:Type igWPF:CellValuePresenter}"> <Setter Property="ForegroundStyle" Value="{StaticResource CustomForeground}" /> <Setter Property="ForegroundAlternateStyle" Value="{StaticResource CustomForeground}" /> </Style> </igWPF:XamDataGrid.Resources>