I'm trying to change the Foreground color of a row by adding a style to CellValuePresenter using the following code:
<Style TargetType="{x:Type igDP:CellValuePresenter}" > <Setter Property="Foreground" Value="Red/></Style>-->
It works fine as long as nothing changes in the row, but whenever I move with the mouse over that row the foreground color changes back to black.
I tried setting the rest of the Foreground properties to null in the same style (ForegroundHover, ForegroundSelected, etc) but it didn't work.
Any Idea?
Hello... No comments?
Hello,
Excuse me for the late reply. I have created a style for the CellValuePresenter for you that sets all the foreground properties and states I could think of:
<SolidColorBrush Color="YellowGreen" x:Key="CVPOverallForeground" />
<Style TargetType="{x:Type igDP:CellValuePresenter}">
<!--To color -->
<Setter Property="Foreground" Value="{StaticResource CVPOverallForeground}"/>
<!--To color on cell activation -->
<Setter Property="ForegroundActiveStyle">
<Setter.Value>
<Style>
<Setter Property="TextElement.Foreground" Value="{StaticResource CVPOverallForeground}" />
</Style>
</Setter.Value>
</Setter>
<!--To color on cell hover-->
<Setter Property="ForegroundHoverStyle">
<!--To color on cell selection (no hover)-->
<Setter Property="ForegroundSelectedStyle">
<Style.Triggers>
<!--To color on record selection-->
<DataTrigger Binding="{Binding RelativeSource={RelativeSource Self}, Path=Record.IsSelected}" Value="True">
<Setter Property="ForegroundStyle">
</DataTrigger>
<!--To color on record hover (no selection) -->
<Trigger Property="IsMouseOverRecord" Value="True">
</Trigger>
</Style.Triggers>
Please let me know if I have missed out something or if you require any further assistance on the matter.
Sincerely,
Petar Monov
Developer Support Engineer
Infragistics Bulgaria
www.infragistics.com/support
I will check it.
Thank you.
I am just checking the progress of this issue and was wondering if you managed to achieve your goal or if you need any further assistance on the matter.
If the above suggestion helped you solve your issue please verify the thread as answered so other users may take better advantage of it.
Sincerely,Petar MonovDeveloper Support EngineerInfragistics Bulgariawww.infragistics.com/support
Thank you very much.