Hello,
I'm trying to style the GroupByAreaMulti but it does not work. I still have the default style. Can someone please advise?
<Style TargetType="{x:Type igDP:GroupByAreaMulti}">
<Setter Property="Prompt1" Value="field 2"/>
<Setter Property="Prompt2" Value="Drag a field 2"/>
<Setter Property="Foreground" Value="Red" />
<Setter Property="FontStyle" Value="Italic" />
<Setter Property="Background" Value="Orange" />
</Style>
<Style x:Key="XamDataGridStyleBase" TargetType="{x:Type igDP:XamDataGrid}">
<Setter Property="GroupByAreaLocation" Value="AboveDataArea"/>
<Setter Property="GroupByAreaMode" Value="MultipleFieldLayoutsFull"/>
<Setter Property="IsGroupByAreaExpanded" Value="True"/>
Hello Cristina,
I see that you have posted another forum thread very recently, here: https://ko.infragistics.com/community/forums/f/ultimate-ui-for-wpf/118045/expanderbar-not-displaying. In this forum thread, it looks like you have found that to style the "top", expandable part of the GroupByAreaMulti, that you need to style the ExpanderBar element. If you set the Background and BackgroundHover of that element, you can style this piece.
The GroupByAreaMulti style that you are applying should also work in this case, with the exception of a Rectangle at the top that uses a static brush. This brush has a static key of "GroupByAreaMultiHighlightBrush" and you can style it by defining a SolidColorBrush resource with that key. For example, if you wanted this area to be purple, you could use something like the following:
<SolidColorBrush Color="Purple" x:Key="{x:Static ig:DataPresenterBrushKeys.GroupByAreaMultiHighlightBrush}"/>
In the other forum thread, you have mentioned that you are currently applying a theme to the XamDataGrid, though. In order to have your styles respected, you will need to merge them with the XamDataGrid.Resources. Every WPF element only takes one local style, and so by applying a "theme" you are applying a set of styles local to the XamDataGrid, but these can be overwritten by the styles in the XamDataGrid.Resources section.
I have attached a sample project demonstrating a full styling of the GroupByAreaMulti. I hope this helps you.
Please let me know if you have any other questions or concerns on this matter.
XDGDemo.zip
Thank you for your prompt reply.
Unfortunately, I am unable to get this to work in my project. I believe there may be a theme that is overriding this.
I can't get the expander nor the GroupByAreaMulti style change to show. The GroupByAreaMulti just shows the default prompts (group by area, Drag a field here to group by that field),
Is it possible to set both of these with a static resource key?
I actually see my style changes in designer mode but not in runtime mode.
I was able to resolve this. Thank you very much for your help!