Although I specify the cells to have a foreground color of "foregroundLight" all the time, each cell's content in anyone row will change to a black foreground when i mouse over anyone cell in that row. I would like them to stay the "foregroundLight" color. I am defining the XamDataGrid Containers with the following definitions:
<!--CHILD (ChildLayout) -->
<igDP:FieldLayout Key="ChildLayout" ParentFieldLayoutKey="FieldLayout">
<igDP:FieldLayout.FieldSettings>
<igDP:FieldSettings AllowEdit="False"
AllowResize="False"
LabelTextAlignment="Left"
CellValuePresenterStyle="{StaticResource childCellStyle}"
AllowHiding="ViaFieldChooserOnly"
FilterOperandUIType="TextBox"
/>
</igDP:FieldLayout.FieldSettings>
<igDP:FieldLayout.Settings>
<igDP:FieldLayoutSettings LabelLocation="Hidden"
DataRecordCellAreaStyle="{StaticResource childCellCollectionStyle}"
DataRecordPresenterStyle="{StaticResource childRowStyle2}"
FilterAction="None"
RecordSelectorLocation="None"/>
</igDP:FieldLayout.Settings>
!--CHILD ROW-->
<Style x:Key="childRowStyle" TargetType="{x:Type igDP:DataRecordPresenter}">
<Setter Property="Background" Value="{StaticResource bblack}"/>
<Setter Property="BorderBrush" Value="Transparent"/>
<Setter Property="BorderThickness" Value="0"/>
<Setter Property="Foreground" Value="{StaticResource foregroundLight}"/>
<Setter Property="FontFamily" Value="pack://application:,,,/Theme/Fonts/#Segoe UI" />
<Setter Property="TextOptions.TextFormattingMode" Value="Display"/>
<Setter Property="VerticalContentAlignment" Value="Center"/>
<Setter Property="Margin" Value="40,2,0,10"/>
<Setter Property="Cursor" Value="Hand"/>
</Style>
<!--CHILD CELL COLLECTION-->
<Style x:Key="childCellCollectionStyle" TargetType="{x:Type igDP:DataRecordCellArea}">
<Setter Property="BackgroundSelected" Value="{StaticResource bblack}" />
<Setter Property="BackgroundActive" Value="{StaticResource bblack}" />
<Setter Property="BackgroundHover" Value="{StaticResource bblack}" />
<Setter Property="BorderHoverBrush" Value="Transparent"/>
<Setter Property="ForegroundStyle" Value="{StaticResource LightForeground}"/>
<Setter Property="ForegroundHoverStyle" Value="{StaticResource LightForeground}"/>
<Setter Property="ForegroundSelectedStyle" Value="{StaticResource LightForeground}"/>
<Setter Property="ForegroundActiveStyle" Value="{StaticResource LightForeground}"/>
<Setter Property="Margin" Value="0"/>
<!--CHILD CELL-->
<Converter:ValueToEnabledConverter x:Key="convEnabled" />
<Style x:Key="childCellStyle" TargetType="{x:Type igDP:CellValuePresenter}">
<Setter Property="BorderThickness" Value="0" />
<Setter Property="CornerRadius" Value="2"/>
<Setter Property="TextElement.FontFamily" Value="pack://application:,,,/Theme/Fonts/#Segoe UI" />
<Setter Property="Height" Value="30"/>
<Setter Property="BackgroundSelected" Value="{StaticResource fourthGrey}" />
<Setter Property="BackgroundHover" Value="{StaticResource thirdGrey}" />
<!--<Setter Property="ForegroundStyle" Value="{StaticResource LightForeground}"/>-->
<Setter Property="ForegroundHoverStyle" Value="{StaticResource DarkForeground}"/>
<Setter Property="ForegroundSelectedStyle" Value="{StaticResource DarkForeground}"/>
<Style x:Key="childRowStyle2" TargetType="{x:Type igDP:DataRecordPresenter}" BasedOn="{StaticResource childRowStyle}">
<EventSetter Event="PreviewMouseRightButtonDown" Handler="DRP_MouseRightButtonDown" />
Hello,
I am just checking if you got this worked out or you still require any assistance or clarification on the matter.
Thank you for your post. I have been looking through it and the code you have posted and since there are Animations defined in the CellValuePresenter and DataRecordPresenter default styles your behavior is expected and the thing you can do here is either change this animations or delete them and use your code. In this forum post:
http://forums.infragistics.com/forums/t/55709.aspx
it is discussed where you can find them. Please let me know if this is helped you or you need further assistance on this matter.
Looking forward for your reply.