I have a xamGrid with a header row. I have set the style of the headers to be a gradient (I don't think this has anything to do with my issue). When I roll the cursor over the header cell it changes to a white to blue gradient. I do not think that I set it this way, it is probably a default behavior. How do I get the header cells to just stay the same color as I roll over them?
Hi,
You're not going to be able to do so from the codebehind. You can still do the re-templating approach and simply use an ImplicitStyle.
What i mean by that is, you can take the approach i suggested above, pub the style in your App.xaml file, set the TargetType on the style, but don't set the key. When you run the application, the HeaderCell's will automatically pick up your style.
-SteveZ
Ugh. That is nasty. I have created my grids in code (yea I know, bad choice) so I do not have xaml for blend to work with. Is there a way to fix this in c# code?
So this is a VisualState of the HeaderCellControl.
You can re-template the HeaderCellControl, and remove that VisualState.
Here is a helpful tutorial on how to modify a ControlTemplate of one of our controls:
http://help.infragistics.com/NetAdvantage/Silverlight/2010.3/CLR4.0/?page=SL_DesignersGuide_Editing_Style_Properties_Using_Expression_Blend.html
If you do not have blend, you can get a copy of the HeaderCellControl by accessing the XamGrid's generic.xaml file:
http://help.infragistics.com/NetAdvantage/Silverlight/2010.3/CLR4.0/?page=SL_DesignersGuide_Location_of_Generic_xaml_File.html
Hope this helps,