Hello,
I styled the cells of a XamGrid to display a gradient background without any border lines using this XAML code:
<Style x:Key="GridCellStyle" TargetType="ig:CellControl"> <Setter Property="Background" Value="{StaticResource GridRowBackgroundBrush}" /> <Setter Property="BorderThickness" Value="0" /></Style>
<ig:XamGrid CellStyle="{StaticResource GridCellStyle}">
This is working fine.But I could not find a way to style the selected active row. How to do this?When I select a row, it turns blue and the cell borders are visible again...
Thanks.
Hello Josef,
In order to set style selected row I advise you to retemplate the whole style for the CellControl. You could find the style for the CellControl in the generic.xaml file in the \Infragistics\NetAdvantage 2012.1\WPF\DefaultStyles\XamGrid\. There you could define your own brushesh for CellRowHoverBackgroundBrush, CellItemSelectedBackgroundBrush or change the default brushes. They are used when certain action appears (e.g. mouse is over the cell, the cell is selected , etc.). By changing these brushes the rows are displayed as you wish even when there is a selected/active row.
Please feel free to let me know if this helps you in resolving your issue.
Hello Maria,
thank you for this hint.Unfortunately I am relatively new to WPF/XAML and have no experiences with retemplating so far.Do I have to copy the whole template XAML <Style TargetType="ig:CellControl"> ... </Style> from the generic.xaml to my windows resources and edit them there?Or is it possible to use keep the generic template and modify only the brush properties?
It would be nice if you could provide me a simple sample how to do this.