Pnctovski
Pnctovski

Reputation: 575

Removing border on ListViewItem

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.

Upvotes: 6

Views: 1863

Answers (1)

Florian Gl
Florian Gl

Reputation: 6014

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".

Upvotes: 1

Related Questions