How to change the GridLine color and thickness?

23 Oct 2019 / 1 minute to read

GridLine color can be changed by using the GridLineStroke property of PivotGrid and it can be mentioned either in XAML or in Code-Behind.

If through XAML, please refer the below code sample.

  • xaml
  • <syncfusion:PivotGridControl HorizontalAlignment="Left" Name="pivotGrid" VerticalAlignment="Top" GridLineStroke="#2F5BB7" ItemSource="{Binding   Source={StaticResource data}}">
    </syncfusion:PivotGridControl>

    Else if through Code-Behind, please refer the below code sample.

  • c#
  • public MainWindow() {
        InitializeComponent();
        pivotGrid.GridLineStroke = new SolidColorBrush(Colors.Black);
    }