Remove one pixel white border from WPF listview

I used my kineticlistview in one project, and I noticed that it has a nasty white border around the content, but when I change back the control to standard ListView I noticed that the border remains.

This means that this is standard behavior of the ListView, but it is inacceptable on this project where I use the ListView to show pictures.


Now you can simply go to blend, right click the ListView and choose to edit the template


Now I simply give a name to this new template and store them into a resource file


This will make my new template available everywhere in the project. Here is the default template of the ListView


Just set all paddings to zero and the game is done. Now that you have this new template in a resource file you can apply directly to every ListView of the project simply with a right click on the ListView in Blend.


Now run the program again and…. voilà Smile the nasty one pixel white border is gone.



Published by

Ricci Gian Maria

.Net programmer, User group and community enthusiast, programmer - aspiring architect - and guitar player :). Visual Studio ALM MVP

One thought on “Remove one pixel white border from WPF listview”

Comments are closed.