答案 0 :(得分:1)
最简单的方法是覆盖AutoSuggestBoxSuggestionsListBackground
中的App.xaml
。
<Application.Resources>
<SolidColorBrush x:Key="AutoSuggestBoxSuggestionsListBackground">White</SolidColorBrush>
</Application.Resources>
或者您可以使用VS / Blend Designer生成默认样式,然后找到此行 -
<ListView x:Name="SuggestionsList" BorderBrush="{ThemeResource AutoSuggestBoxSuggestionsListBorderBrush}" BorderThickness="{ThemeResource AutoSuggestListBorderThemeThickness}" Background="{ThemeResource AutoSuggestBoxSuggestionsListBackground}" DisplayMemberPath="{TemplateBinding DisplayMemberPath}" IsItemClickEnabled="True" ItemTemplate="{TemplateBinding ItemTemplate}" ItemContainerStyle="{TemplateBinding ItemContainerStyle}" ItemTemplateSelector="{TemplateBinding ItemTemplateSelector}" MaxHeight="{ThemeResource AutoSuggestListMaxHeight}" Margin="{ThemeResource AutoSuggestListMargin}" Padding="{ThemeResource AutoSuggestListPadding}">
然后将Background="{ThemeResource AutoSuggestBoxSuggestionsListBackground}"
替换为Background="White"
。
答案 1 :(得分:-1)
在您的autosuggestbox中:
<AutoSuggestBox background="transparent"/>