tags:

views:

76

answers:

1
A: 

I can't see the image because of a proxy issue, but I think you just need to set the background of the container:

<ListBox>
    <ListBox.ItemContainerStyle>
        <Setter Property="Background" Value="White"/>
    </ListBox.ItemContainerStyle>
</ListBox>

If you want the selection highlight to show outside the padded area, just set the Background back to null in the child container.

HTH, Kent

Kent Boogaart
Your answer made me realize, that the border in my DataTemplate is placed inside the item container (list box item), and not replacing it as I thought. Eventually, I set the padding in the item container style to be 0, and my problem was solved.
Andy