Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
215
Styling GroupByAreaMulti
posted

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"/>

</Style>

Parents
No Data
Reply
  • 34810
    Offline posted

    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

Children