Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Removing border on ListViewItem

Tags:

wpf

xaml

I would like to remove the border which is between the border of ListView and ListViewItem which looks like it is a border of LVItem. I really need to get rid of it, since I wanna the selected item to be connected with the right lightgray area. (Sure without that white border which was only testing border, to see whats going on with those borders in listview)

enter image description here

This is my styling code: http://pastebin.com/TH83CaL0

And my listview xaml code looks like this:

http://pastebin.com/zvyJem02

Edit: I am newbie with wpf and xaml, since I started with 1 week ago.

like image 949
Pnctovski Avatar asked Apr 02 '13 07:04

Pnctovski


1 Answers

I think you can't get rid of this border only by Styling, but you could move the "right lightgray area" a little to the left and let it overlap your ListView by setting Margin="-1.5 0 0 0" Panel.ZIndex="1" or (as you did) hide a little of the ListBox behind the gray area by setting its Margin="-1".

like image 182
Florian Gl Avatar answered Oct 07 '22 06:10

Florian Gl