In the XamFeatureBrowser, there's a sample that shows how to change the background of fixed fields.
Basically:
Normal 0 false false false EN-AU X-NONE X-NONE MicrosoftInternetExplorer4
<Style TargetType="{x:Type igDP:CellValuePresenter}">
<Style.Triggers>
<Trigger Property="IsFixed" Value="True">
<Setter Property="Background">
<Setter.Value>
<LinearGradientBrush StartPoint="0,0" EndPoint="1,0">
<GradientStop Offset="0" Color="#00000000"/>
<GradientStop Offset="1" Color="#19000000"/>
</LinearGradientBrush>
</Setter.Value>
</Setter>
</Trigger>
</Style.Triggers>
Now in the sample, for those fixed fields, the cells in the fixed fields are highlighted on mouse over and isSelected but when I copy the above XAML into my own grid, they no longer get highlighted.
Can anyone tell me what I'm missing here?
Hello,
The CellValuePresenter exposes several different properties for background - like Background, BackgroundSelected, BackgroundPrimary, BackgroundActive, BackgroundHover etc. controlling the different states of the Cells/Records. You should probably take into consideration them as well as the Background property.
None of these properties had any effect whatsoever on the cell in the fixed field. I also note that the sample didn't set any of these properties, as far as I could see.
The only way I could partially resolve it was to add triggers to my style and change the background back to transparent:
<DataTrigger Binding="{Binding Path=Record.IsSelected, RelativeSource={RelativeSource Self}}" Value="True">
<Setter Property="Background" Value="Transparent" />
</DataTrigger>
<DataTrigger Binding="{Binding Path=Record.IsActive, RelativeSource={RelativeSource Self}}" Value="True">
But there is no IsMouseOver property on the Record so I can't use the same logic to correct the highlight on mouse hover. Any ideas how I might go about that?