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.

image

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

image

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

image

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

SNAGHTML20379ac

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.

image

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

image

Alk.