I am trying to apply conditional formatting on a column in a XamGrid. I want the font to be red if the value is negative.
<Style x:Key="RedFontStyle" TargetType="ig:CellControl"> <Setter Property="Foreground" Value="DarkRed"/> </Style>
<Style x:Key="RedFontStyle" TargetType="ig:CellControl">
<Setter Property="Foreground" Value="DarkRed"/>
</Style>
<ig:TextColumn.ConditionalFormatCollection> <ig:LessThanConditionalFormatRule Value="0.00" StyleToApply="{StaticResource RedFontStyle}" /> </ig:TextColumn.ConditionalFormatCollection>
<ig:TextColumn.ConditionalFormatCollection>
<ig:LessThanConditionalFormatRule Value="0.00" StyleToApply="{StaticResource RedFontStyle}" />
</ig:TextColumn.ConditionalFormatCollection>
The LessThanConditionalFormatRule element has "Value cannot be null. Paramenter name key." What am I doing wrong?
Thanks!
Hello elondon,
For setting the style on negative values I have attached a sample.