In relation to a previous question, I have the following code which disables the blue background:
<ListBox Background="Transparent" BorderBrush="Transparent">
<ListBox.Style>
<Style>
<Style.Resources>
<!-- Background of selected item when focussed -->
<SolidColorBrush x:Key="{x:Static SystemColors.HighlightBrushKey}" Color="Transparent" />
<!-- Background of selected item when not focussed -->
<SolidColorBrush x:Key="{x:Static SystemColors.ControlBrushKey}" Color="Transparent" />
</Style.Resources>
</Style>
</ListBox.Style>
<ItemsControl.ItemTemplate>
<DataTemplate>
<Border Margin="5" BorderThickness="2" BorderBrush="LightGray" CornerRadius="5">
<Expander IsExpanded="True" Background="#f7f7f7">
<!-- Content -->
</Expander>
</Border>
</DataTemplate>
</ItemsControl.ItemTemplate>
</ListBox>
What I'm noticing is that now all things like combo boxes that are in the content also have the same style of transparent selection. What do I need to do to get the selection to only be transparent for the ListBoxItem and not for its contents?