C# xamDataGrid筛选器记录样式
我正在尝试更改xamDataGrid中筛选器记录的背景色 我已经按照基础设施论坛的建议尝试了C# xamDataGrid筛选器记录样式,c#,wpf,xaml,infragistics,xamdatagrid,C#,Wpf,Xaml,Infragistics,Xamdatagrid,我正在尝试更改xamDataGrid中筛选器记录的背景色 我已经按照基础设施论坛的建议尝试了,并且 <Style TargetType="{x:Type igDP:DataRecordPresenter}"> <Style.Triggers> <DataTrigger Binding="{Binding RelativeSource={RelativeSource Self}, Path=IsFilterRecord}" Value="True">
,并且
<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>
但它们都不起作用,我的过滤器行仍然是白色的
有什么想法吗?试试看
TargetType="{x:Type igDP:DataRecordCellArea}"
背景颜色来自使用AddRowBackground资源的模板中的边框。此资源可以使用以下设置
DataPresenterBrushKeys类:
我知道有点晚了,但我遇到了同样的问题。 我发现我正在设置DataRecordCellea背景,它与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"/>
为了解决这个问题,我已经注释掉了DataRecordCellea背景
<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"/>
现在过滤器行背景为红色