I am using a DataTrigger to set the background property of the CellValuePresenter. The converter sets the background color based on value in Field1Dummy as shown below...
<DataTrigger Binding="{Binding Path=Field.Name, RelativeSource={RelativeSource Self}}" Value="Field1"> <Setter Property="Background" Value="{Binding Path=Cells[Field1Dummy].Value, Converter={StaticResource myconv}}"/> </DataTrigger>
The above logic works fine. I have also set property SelectionTypeCell to Range. However, when I select a range a cells, the cell borders change color but background remains white. In other xamDataGrids that I have used, all the cells that are selected turn skyblue in color. I guess, the above DataTrigger the above DataTrigger might be conflicting with the background of selected cells.
I have tried:
<Setter Property="BackgroundSelected" Value="DarkBlue"/>
but the above doesn't seem to have any impact. Basically, I just want the selected range of cells to have color DarkBlue (or even the default is fine). How do I do this?
Thanks.