Introduction
In this article we will see how we can customize the Gridline color in datagrid
in WPF.
Creating WPF Application
Fire up Visual Studio 2010 and create a WPF Application, name the solution as
CustomDatagrid.
Add a Datagrid to the application by dragging from the toolbox to the designer.
Here are the initial settings when you add the Datagrid.
Now let's fill in the datagrid with sample data.
Now let's see how it looks without the Height customization.
In Datagrid we have couple of properties like HorizontalGridLinesBrush and
VerticalGridLinesBrush. By default the Brushes are Black. 

Let's change the above Brushes to Blue and Red respectively.
Now run the application, and you would see the changes.
Hope this article helps.
Join the conversation! Your thoughts help the community grow.
Sign in to leave a comment
It is the same account you read, post and publish with — and you will come straight back to this page.

Jacky LeePosted Jan 7, 2011, 9:05 AM
this is a simple app
Madhusudhan reddyPosted Jun 30, 2010, 2:26 AM
Thank you for the post... Madhu