Hi
How can I change the header, cell hover style of column header etc? In general those resources that are not derived from TemplateBinding.
Regards
Babu
Hi,
In order to change the style (and/or template) of the header cells you need to set the style property XamWebGrid.HeaderStyle, using TargetType - HeaderCellControl.
This is just simple snippet how to change the text color of the columns:...<ig:XamWebGrid> <ig:XamWebGrid.HeaderStyle> <Style TargetType="igPrim:HeaderCellControl"> <Setter Property="Foreground" Value="Red" /> </Style> </ig:XamWebGrid.HeaderStyle>...More information about styling the xamWebGrid:http://help.infragistics.com/NetAdvantage/Silverlight/2010.1/CLR3.5/?page=SL_DesignersGuide_Styling_Points_for_xamWebGrid.html
You can use Blend or the default control templates as starting point of more sophisticated changes. You can find the xaml files in the installation directory of the product.
This sets the normal style and not hover style. I use the following:
<igGrid:XamWebGrid ... HeaderStyle="{StaticResource MyHeaderStyle}" ...
Where MyHeaderStyle is defined resource as follows:
<Style x:Key="MyHeaderStyle" TargetType="igPrim:HeaderCellControl">
<Setter Property="Background" Value="Red"/>
</Style>
This no doubt changes the appearance. But, when I hover over the header,. I wish to retain the red background color.
There is not specific Hover Brush property.
Thats controlled via VisualStates in the ControlTemplate of the HeaderCellControl.
If you have Blend there is a help article that explains how to modify the ControlTemplate of a control:
http://help.infragistics.com/NetAdvantage/Silverlight/2009.1/CLR3.5/?page=SL_DesignersGuide_Editing_Style_Properties_Using_Expression_Blend.html
Hope this helps clarify things,
-SteveZ
The Blend approch is okey for relatively small control like the outlookbar. But for Grid that has roughly 3000 Xaml lines, it is entirely an other matter. I guess for now, I don't have any other choice.
To be clear, the grid is broken into lots of different styles.
So in this case, you'd be modifying just the HeaderCellControl, which has no where near 3000 lines of xaml.
Unfortunately, the grid is a part of a framework that is designed to implement common company standards. We believe that a developer concentrates on business logic rather than rudimentary that has same look and feel over all in-house applications.