Hello
We are having XamDataGrid with GroupBy feature. We are using also Office2010Blue as a Theme.
The problem is that, in this Theme, grouped item background color is yellow.. the same as selected item. It's confusing (see attached image)
Because I cannot change the Theme, It would be nice to set a style for it, to have grouped item backcolor green for instance).
However, there seems to be no way to handle it. The only ineresting solution I found is this:
http://blogs.infragistics.com/blogs/alex_fidanov/archive/2010/02/09/setting-groupbyrecordpresenter-s-background.aspx
Anyway, I didn't find this style in described xaml files.
Is there no way to handle it except retemplate ?
Any feedback on this one ?
Hello,
Thank you for your post. I have been looking into it and I suggest you add the following Style in your XamDataGrid’s Resources:
<Style TargetType="{x:Type igDP:GroupByRecordPresenter}" BasedOn="{x:Static igThemes:DataPresenterOffice2010Blue.GroupByRecordPresenter}"> <EventSetter Event="Loaded" Handler="GBRPLoaded"/> </Style>
the following handler in the code behind:
private void GBRPLoaded(object sender, RoutedEventArgs e) { (Utilities.GetDescendantFromName(sender as DependencyObject, "highlight") as Border).Background = Brushes.YellowGreen; }
and the namespace for igThemes is:
xmlns:igThemes="http://infragistics.com/Themes"
Please let me know if this helps you or you need further assistance on this matter.