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
3220
xamDataGrid CellValuePresenter Style
posted

Hello,

when using a custom CellValuePresenter style, the font color doesn't change according to the highlighted or selected row font color, when selected. How can I use the same font color in my CellValuePresenter as for highlighted or selected default cells, when this cell is also highlighted?

See screenshot.

Here is the corresponding xaml code, for that cell:

<Style x:Key="styleMutltilineCell" TargetType="{x:Type igDp:CellValuePresenter}" BasedOn="{x:Static igTheme:DataPresenterMetroDark.CellValuePresenter}">
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="{x:Type igDp:CellValuePresenter}">
                        <Border BorderBrush="{TemplateBinding BorderBrush}"
                                BorderThickness="{TemplateBinding BorderThickness}">
                            <TextBlock Text="{TemplateBinding Value}" TextWrapping="Wrap" Padding="{TemplateBinding Padding}" VerticalAlignment="Center"/>
                        </Border>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>