I'm trying to get the backcolor of cell Textblock to something other than white when it has been moused over. (see attached image)
I have tried overriding the CellValuePresenter and in the process have changed every color in the cell except for the back color of the Textblock (which is white in the screen cap). I've tried changing the the "PART_EditorSite" ContentPresenter, but with no luck.
I would like for the backgroun to go transparent. Trying to get similar behavior as the Office2007Black theme where when you mouse over, all you see is the Orange and not the white textbox.
Thanks for you help in advance.
That was the secret sauce.. Thanks for your help.
Hi,
I'm trying to help you. have you try to use the editor, such as ValueEditor or XamTextEditor? this style is worked in my code, try it.
<StyleTargetType="{x:Type igEditors:XamTextEditor}" > <Setter Property="Background" Value="Red"/>
</Style>
if your cell is numeric, use XamNumericEditor.
regards,
Vera
Alex and Vlad, thank you for your reply. Changing the BackgroundHover does change the cell background color, and I was able to do that previously. If you look at the image in my original post, you can see the cell background (ie BackgroundHover color) is pinkish color. But I'm trying to change the background color (which is currently white) of the textbox/textblock that is in the cell. How do I get access to the properties of that textbox/textblock, specifically the background color.
You can see this behavior if you drop a grid with a cell onto a panel. Mouse over the cell and you will see the BackgroundHover color change and then if you move further into the cell the cell' textbox/textblock mouseover statechange will fire which results in displaying the textbox/textblock with it's white background.
This only happens in the default datagrid. The Office2007Black theme solves this problem. Not sure how.
Thanks
You can try with the following style :
<igDP:XamDataGrid x:Name="xamDataGrid1" BindToSampleData="True" > <igDP:XamDataGrid.Resources> <Style TargetType="{x:Type igDP:DataRecordCellArea}"> <Setter Property="BackgroundHover" Value="Red" /> </Style> </igDP:XamDataGrid.Resources> </igDP:XamDataGrid>
Regards
Vlad
Hello,
The CellValuePresenter has a lot more properties for coloring. Here is a list of them in our help.
You are probably looking for the BackgroundHover property. You might also find helpful looking at our generic(default) styles for our components and their parts in the DefaultStyles directory in the Infragistics folder on your computer.
Please let me know if you have any more questions on this.