xamDataGrid过滤器记录样式



我正在尝试更改xamDataGrid中过滤器记录的背景颜色。

我已经尝试了<SolidColorBrush x:Key="{ComponentResourceKey {x:Type igDP:XamDataGrid}, AddRowBackground}" Color="Red"/>在Infragistics论坛上的建议,和

<Style TargetType="{x:Type igDP:DataRecordPresenter}">
  <Style.Triggers>
    <DataTrigger Binding="{Binding RelativeSource={RelativeSource Self}, Path=IsFilterRecord}" Value="True">
      <Setter Property="Background" Value="#363636" />
    </DataTrigger>
  </Style.Triggers>
</Style>

但是它们都不起作用,我的过滤器行仍然是白色的。

任何想法?

Try

TargetType="{x:Type igDP:DataRecordCellArea}"

背景色来自使用AddRowBackground资源的模板中的边框。该资源可以使用以下命令

设置

<SolidColorBrush x:Key="{ComponentResourceKey {x:Type igDP:XamDataGrid}, AddRowBackground}" Color="#363636"/>

DataPresenterBrushKeys类:http://help.infragistics.com/NetAdvantage/WPF/Current/CLR4.0/?page=InfragisticsWPF4.DataPresenter.v11.2 Infragistics.Windows.DataPresenter.DataPresenterBrushKeys.html

我知道有点晚了,但我遇到了同样的问题。我发现的是,我正在设置DataRecordCellArea背景与AddRowBackground重叠。

<Style TargetType="{x:Type igDp:DataRecordCellArea}">      
  <Setter Property="Background" Value="{DynamicResource DataGridBackgroundBrush}" />
</Style>
<SolidColorBrush x:Key="{ComponentResourceKey {x:Type igDp:XamDataGrid}, AddRowBackground}" Color="Red"/>

为了解决这个问题,我已经注释掉了DataRecordCellArea的背景

<Style TargetType="{x:Type igDp:DataRecordCellArea}">      
      <!--<Setter Property="Background" Value="{DynamicResource DataGridBackgroundBrush}" />-->
<!-- other stters -->
    </Style>
<SolidColorBrush x:Key="{ComponentResourceKey {x:Type igDp:XamDataGrid}, AddRowBackground}" Color="Red"/>

现在滤镜行背景为红色

最新更新