C# 组合框顶部的选定项目背景不弹出
我正在寻找一种在那里设置图像背景的方法。。因为它是灰色背景上的白色。。所选项目触发器不工作,因为没有父ComboboxItemC# 组合框顶部的选定项目背景不弹出,c#,wpf,C#,Wpf,我正在寻找一种在那里设置图像背景的方法。。因为它是灰色背景上的白色。。所选项目触发器不工作,因为没有父ComboboxItem <ComboBox.Resources> <DataTemplate x:Key="DataTemplate1"> <Border x:Name="border" Padding="10"> <I
<ComboBox.Resources>
<DataTemplate x:Key="DataTemplate1">
<Border x:Name="border" Padding="10">
<Image Source="{Binding }" Stretch="None"/>
</Border>
</DataTemplate>
<ItemsPanelTemplate x:Key="ItemsPanelTemplate1">
<WrapPanel Width="{Binding ActualWidth , RelativeSource={RelativeSource Mode=FindAncestor,
AncestorType={x:Type ComboBox }}}" Background="{StaticResource ListItemSelected}" Orientation="Horizontal" IsItemsHost="True"/>
</ItemsPanelTemplate>
</ComboBox.Resources>