Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 10 additions & 3 deletions wpf/Pivot-Grid/How-To/Change-the-Gridline-Color-and-Thickness.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,20 @@ documentation: ug

# How to change the GridLine color and thickness?

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

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

{% highlight xaml %}

<syncfusion:PivotGridControl HorizontalAlignment="Left" Name="pivotGrid" VerticalAlignment="Top" GridLineStroke="#2F5BB7" ItemSource="{Binding Source={StaticResource data}}">
</syncfusion:PivotGridControl>
<syncfusion:PivotGridControl HorizontalAlignment="Left" Name="pivotGrid" VerticalAlignment="Top" ItemSource="{Binding Source={StaticResource data}}">
<syncfusion:PivotGridControl.GridLineStroke>
<SolidColorBrush Color="DeepPink"/>
</syncfusion:PivotGridControl.GridLineStroke>
<syncfusion:PivotGridControl.ValueCellStyle>
<syncfusion:PivotGridCellStyle BorderThickness="2"/>
</syncfusion:PivotGridControl.ValueCellStyle>
</syncfusion:PivotGridControl>

{% endhighlight %}

Expand All @@ -27,6 +33,7 @@ Else if through *Code-Behind*, please refer the below code sample.
public MainWindow() {
InitializeComponent();
pivotGrid.GridLineStroke = new SolidColorBrush(Colors.Black);
pivotGrid.ValueCellStyle.BorderThickness = 2;
}

{% endhighlight %}
Expand Down