listbox选中后背景颜色设定
用listbox自定义了一个radiobuttonlist,但是在选择时如果正好选在listbox和radiobutton之间的部分就会出现Listboxitem选中的背景色,参考了一trigger,但是还是无法设置背景色,想问一下问题在哪里
<UserControl x:Class="WpfApplication1.RadioButtonList"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Height="300" Width="300">
<Grid>
<StackPanel Margin="0,0,21.658,0" Height="44" VerticalAlignment="Top">
<StackPanel.Resources>
<Style x:Key="HorizontalRadioButtonList" TargetType="{x:Type ListBox}">
<Setter Property="Background" Value="Transparent"/>
<Setter Property="ItemsPanel">
<Setter.Value>
<ItemsPanelTemplate>
<VirtualizingStackPanel Background="Transparent" Orientation="Horizontal"/>
</ItemsPanelTemplate>
</Setter.Value>
</Setter>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type ListBoxItem}">
<RadioButton Name="radioitem">
<ContentPresenter/>
</RadioButton>
<ControlTemplate.Triggers>
<Trigger Property="IsFocused" Value="false">
<Setter TargetName="radioitem" Property="Background" Value ="Black" />
<Setter TargetName="radioitem" Property="Opacity" Value="0.5" />
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
<Setter Property="Control.Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type ListBox}">
<Border BorderThickness="0" Padding="0" BorderBrush="Transparent" Background="Transparent" Name="Bd" SnapsToDevicePixels="True">
<ItemsPresenter SnapsToDevicePixels="{TemplateBinding UIElement.SnapsToDevicePixels}" />
</Border>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</StackPanel.Resources>
<ListBox Name="windowStyleSelector" Style="{StaticResource HorizontalRadioButtonList}" >
<ListBoxItem >
<Label >aa</Label>
</ListBoxItem>
</ListBox>
</StackPanel>
</Grid>
</UserControl>