Hi,
I am also trying to set row Foreground color based on a particular column's value but my (Below) solution does work for Background color not for Foreground color. Does anybody know how to set Forground color of entire row based on a Column's value.
<local:CvpBackgroundBrushConverter x:Key="cvpBackgroundBrushConverter"/>
<Style x:Key="cvpNegativeStyle" TargetType="{x:Type ig:DataRecordPresenter}">
<Setter Property="Foreground" Value="{Binding Path=DataItem.Price, Converter={StaticResource cvpBackgroundBrushConverter}}" />
</Style>
<ig:XamDataGrid Theme="Generic" x:Name="_grid">
<ig:XamDataGrid.FieldSettings><ig:FieldSettings AllowCellVirtualization="True" AllowEdit="False" /></ig:XamDataGrid.FieldSettings>
<ig:XamDataGrid.FieldLayoutSettings><ig:FieldLayoutSettings AutoGenerateFields="True" DataRecordPresenterStyle="{StaticResource cvpNegativeStyle}" /></ig:XamDataGrid.FieldLayoutSettings>
</ig:XamDataGrid>
Thanks,
Naveen
Yes,
I changed setter to
<Setter Property="Foreground" Value="{Binding Path=DataItem, Converter={StaticResource cvpBackgroundBrushConverter}}" />
public
culture_)
{
... logic to return appropriate Brush here...
Hey,
Did you find an answer?