I'm working with a grid that changes the background of certain cells to various colors depending on the state of that cell's object. The problem is that despite my efforts, when a cell is selected there is a blue tint applied to the background, obscuring the color. I've tried to set BackgroundSelected to Transparent for both the DataRecordCellArea and the CellValuePresenterStyle, but neither of these changes remove the tint. Are there any other settings, maybe a higher level setting of the XamDataGrid object, that are layered on top of both CellValuePresenter and DataRecordCellArea settings?
If I have to choose I wouldn't mind having no default selected/hover styling of the grid, though ideally it would still apply to cells with different styles.
Hello John,
Thank you for your post. I have been looking into your requirement and I suggest you add the following Style in your XamDataGrid’s Resources:
<Style TargetType="{x:Type igDP:DataRecordCellArea}"> <Setter Property="BackgroundHover" Value="Transparent"/> <Setter Property="BackgroundActive" Value="Transparent"/> <Setter Property="BorderActiveBrush" Value="Transparent"/> <Setter Property="BorderHoverBrush" Value="Transparent"/> <Setter Property="BorderSelectedBrush" Value="Transparent"/> <Setter Property="BackgroundSelected" Value="Transparent"/> </Style>
Please let me now if this helps you or you need further assistance on this matter.
Looking forward for your reply.
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 feedback. I am glad that you resolved your issue and I believe that other community members may benefit from this as well.
Thanks again.
Hi, thanks for following up on this. I managed to achieve the results I wanted by setting the BackgroundActive color for the CellValuePresenter Style, and the BackgroundSelected color for the DataRecordCellArea Style. I am pretty sure I needed to set both for the effect I wanted, though once I saw it was working I admit I didn't try to hard to identify if just one or the other change was the solution.
Thanks again,
John Moran