Category / Section
How to change the Metro Brush for the PivotGridControl
1 min read
We cannot set the “SkinStorage.MetroBrush” property for PivotGrid control. As per our current implementation, we have used a separate style for all themes. We can set Metro theme for PivotGrid and can override the colors for PivotGrid CellStyle. Please find the following codes to let you know how to set the Metro theme for the PivotGridControl and how to override the PivotGrid CellStyle for RowHeaderCell, ColumnHeaderCell, SummaryHeaderCell and ValueCell.
Code snippet to set Metro Theme for PivotGrid Control:
<syncfusion:PivotGridControl x:Name="pivotGrid1" VisualStyle="Metro" ItemSource="{Binding ProductSalesData}"/>
Code Snippet to override PivotGridCellStyle:
<syncfusion:PivotGridControl.RowHeaderCellStyle> <syncfusion:PivotGridCellStyle Background="Aqua" /> </syncfusion:PivotGridControl.RowHeaderCellStyle> <syncfusion:PivotGridControl.ColumnHeaderCellStyle> <syncfusion:PivotGridCellStyle Background="Aqua" /> </syncfusion:PivotGridControl.ColumnHeaderCellStyle> <syncfusion:PivotGridControl.SummaryCellStyle> <syncfusion:PivotGridCellStyle Background="Goldenrod" /> </syncfusion:PivotGridControl.SummaryCellStyle> <syncfusion:PivotGridControl.SummaryHeaderStyle> <syncfusion:PivotGridCellStyle Background="AliceBlue" /> </syncfusion:PivotGridControl.SummaryHeaderStyle> <syncfusion:PivotGridControl.ValueCellStyle> <syncfusion:PivotGridCellStyle Background="Bisque" /> </syncfusion:PivotGridControl.ValueCellStyle>