Skip to content

Commit 4fd5ad1

Browse files
ES-68261 - To change the GridLine color and thickness of PivotGrid.
1 parent b50d8be commit 4fd5ad1

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

wpf/Pivot-Grid/How-To/Change-the-Gridline-Color-and-Thickness.md

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,19 @@ documentation: ug
99

1010
# How to change the GridLine color and thickness?
1111

12-
GridLine color can be changed by using the `GridLineStroke` property of PivotGrid and it can be mentioned either in *XAML* or in *Code-Behind*.
12+
The color and thickness of the grid lines can be modified using the `GridLineStroke` property of the PivotGridControl and the `BorderThickness` property of PivotGridCellStyle.
1313

1414
If through *XAML*, please refer the below code sample.
1515

1616
{% highlight xaml %}
1717

18-
<syncfusion:PivotGridControl HorizontalAlignment="Left" Name="pivotGrid" VerticalAlignment="Top" GridLineStroke="#2F5BB7" ItemSource="{Binding Source={StaticResource data}}">
18+
<syncfusion:PivotGridControl HorizontalAlignment="Left" Name="pivotGrid" VerticalAlignment="Top" ItemSource="{Binding Source={StaticResource data}}">
19+
<syncfusion:PivotGridControl.GridLineStroke>
20+
<SolidColorBrush Color="DeepPink"/>
21+
</syncfusion:PivotGridControl.GridLineStroke>
22+
<syncfusion:PivotGridControl.ValueCellStyle>
23+
<syncfusion:PivotGridCellStyle BorderThickness="2"/>
24+
</syncfusion:PivotGridControl.ValueCellStyle>
1925
</syncfusion:PivotGridControl>
2026

2127
{% endhighlight %}
@@ -27,6 +33,7 @@ Else if through *Code-Behind*, please refer the below code sample.
2733
public MainWindow() {
2834
InitializeComponent();
2935
pivotGrid.GridLineStroke = new SolidColorBrush(Colors.Black);
36+
pivotGrid.ValueCellStyle.BorderThickness = 2;
3037
}
3138

3239
{% endhighlight %}

0 commit comments

Comments
 (0)