Hi!
I'd like to know how can I create a style trigger for the GroupByRecordPresenter to show a different colour depending on the group summary value.
Example: Show red when group sum <> 0 otherwise leave as default.
This style currently sets the background of all group rows to red.
<Style TargetType="{x:Type igWPF:GroupByRecordPresenter}"> <Setter Property="Background" Value="Red" /> </Style>
The problem is I don't know to which property I should bind the trigger to.
Thanks in advance,
Ricardo
Hello Ricardo,
Thank you for your post. I have been looking into it and I created a sample project for you with the functionality you want. Basically I copied the default Style of the GroupByRecordPresenter and bound the Background of a Border from its Template called “highlight” to the Record’s Description. I also used a converter to check if “Count = 1” is contained in the description and if yes I return Red color otherwise I returned the default color which is located in the App.xaml files in the Application’s Resources. You can modify the check in the Converter’s Convert method as per your requiremtns. Please let me know if this helps you or you have further questions on this matter.
Looking forward for your reply.
Hi Stefan,
Yes, this solution works, thank you!
Just as a note, I would have preferred to be able to bind to some property instead of relying on a label value.
Thank you once again for the help.
Thank you for your feedback. I am glad that you resolved your issue and I believe that other community members may benefit from this as well. As for the Property, you can suggest this as new product idea here:
http://ideas.infragistics.com/