WPF ListBox, how to hide border and change selected item background color?
To hide the border, use <ListBox BorderThickness=”0″/> If you don’t want to have a selection, use an ItemsControl instead of the ListBox. The following code hides the border around the ListBox and does always show a white background on the item (if its generated through the ItemsSource-property). <ListBox BorderThickness=”0″ HorizontalContentAlignment=”Stretch”> <ListBox.ItemContainerStyle> <Style TargetType=”ListBoxItem”> <Setter Property=”Padding” … Read more