In ListBox, selected item will be highlighed with blue color.
I don't want to highlight selected item in ListBox.
I am using below style:
<Style x:Key="myLBStyle" TargetType="{x:Type ListBoxItem}">
<Style.Resources>
<SolidColorBrush x:Key="{x:Static SystemColors.HighlightBrushKey}"
Color="Transparent"/>
</Style.Resources>
</Style>
But it does not over-write windows style.
Please suggest.
You need to override template of
ListBoxItem
and changeBackground
color to transparent in the trigger: