.NET Maui中如何设置SFDataGrid分组标题行样式?
.NET Maui中Syncfusion SFDataGrid分组标题行样式不生效问题
我在.NET Maui应用中使用Syncfusion SFDataGrid,已通过KeySelector实现自定义行分组,但设置GroupSummaryRowBackground等属性后仍无法修改分组标题行(即图中“Date Needed”行)的颜色,也未找到相关文档指引。
当前使用的代码:
<sf:SfDataGrid x:Name="dataGrid" Grid.Row="1" Grid.Column="1" Margin="10" AllowEditing="True" AllowGroupExpandCollapse="True" AutoExpandGroups="False" AutoGenerateColumnsMode="None" EditTapAction="OnDoubleTap" GridLinesVisibility="Both" HeaderGridLinesVisibility="Both" ItemsSource="{Binding OrderItems}" NavigationMode="Cell" SelectionMode="Multiple" SortingMode="Single"> <sf:SfDataGrid.DefaultStyle> <sf:DataGridStyle CurrentCellBorderColor="{AppThemeBinding Light={StaticResource HeaderBackgroundLight}, Dark={StaticResource HeaderBackgroundDark}}" GroupSummaryRowBackground="{AppThemeBinding Light={StaticResource HeaderBackgroundLight}, Dark={StaticResource HeaderBackgroundDark}}" GroupSummaryRowTextColor="{AppThemeBinding Light={StaticResource TextHeaderLight}, Dark={StaticResource TextHeaderDark}}" HeaderRowBackground="{AppThemeBinding Light={StaticResource HeaderBackgroundLight}, Dark={StaticResource HeaderBackgroundDark}}" HeaderRowFontAttributes="Bold" HeaderRowTextColor="{AppThemeBinding Light={StaticResource TextHeaderLight}, Dark={StaticResource TextHeaderDark}}" RowBackground="{AppThemeBinding Light={StaticResource PrimaryBackgroundLight}, Dark={StaticResource PrimaryBackgroundDark}}" RowTextColor="{AppThemeBinding Light={StaticResource TextLight}, Dark={StaticResource TextDark}}" SelectedRowTextColor="{AppThemeBinding Light={StaticResource White}, Dark={StaticResource White}}" SelectionBackground="{AppThemeBinding Light={StaticResource CallToActionLight}, Dark={StaticResource CallToActionDark}}" /> </sf:SfDataGrid.DefaultStyle> </sf:SfDataGrid>
内容的提问来源于stack exchange,提问作者Braydon Griffith
相关产品推荐
相关产品推荐

