I am able to change the normal background and foreground color, but not the mouse over background color. Below is my code. Please advise on how to complete the style correctly:
<Style x:Key="myCustomerGroupByFieldStyle" TargetType="{x:Type igDP:GroupByAreaFieldLabel}"> <Setter Property="Foreground" Value="{StaticResource LabelForegroundBrush}" /> <Setter Property="Background" Value="{StaticResource MouseOverBrush}" /> <Setter Property="FontWeight" Value="Bold" /> <Style.Triggers> <Trigger Property="IsKeyboardFocused" Value="true"> <Setter Property="BorderBrush" Value="{StaticResource DefaultedBorderBrush}" /> </Trigger>
<Trigger Property="IsMouseOver" Value="true"> <Setter Property="Background" Value="{StaticResource MouseOverBrush}" /> </Trigger> </Style.Triggers> </Style>
This is a StoryBoard inside the Resources of the ControlTemplate. You have to get the full style from the Default xaml files that we ship inside the DefaultStyles directory in the Infragistics folder. Once you have the full style, you can make the needed modifications to get the desired behavior.
But how and where do I set the HighlightOn brush?
This is controlled by the following trigger inside the Control Template of the GroupByAreaField. If you want to turn the animation off, you have to remove these Story boards. Of course, you can find this full style in the DefaultStyles directory:
<MultiTrigger>
<MultiTrigger.Conditions>
<Condition Property="IsMouseOver" Value="true"/>
</MultiTrigger.Conditions>
<MultiTrigger.EnterActions>
<BeginStoryboard Storyboard="{StaticResource sbHighlightOn}" x:Name="HighlightOn"/>
</MultiTrigger.EnterActions>
<MultiTrigger.ExitActions>
<BeginStoryboard Storyboard="{StaticResource sbHighlightOff}" x:Name="HighlightOff"/>
</MultiTrigger.ExitActions>
</MultiTrigger>
Hope this helps.