当鼠标悬停在我的ComboBox上时,我会得到一个可怕的蓝色/浅蓝色背景配对。
我尝试了这里的解决方案:ComboBox Mouse over color,WPF Combobox Mouse Over,How to style ComboBox Background on Mouse Hover?或WPF combobox default hover color on togglebutton,但仍然没有改变任何东西,我仍然在悬停时得到默认颜色。
有什么建议吗?
提前感谢大家, Demasiado。
以下是XAML代码:
有什么建议吗?
提前感谢大家, Demasiado。
以下是XAML代码:
<Window x:Class="Homepage.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:sys="clr-namespace:System;assembly=mscorlib"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
<Window.Resources>
<Storyboard x:Key="TileZoomIn">
<ThicknessAnimation Storyboard.TargetProperty="Margin" From="10" To="1" Duration="0:0:0.1"/>
</Storyboard>
<Storyboard x:Key="TileZoomOut">
<ThicknessAnimation Storyboard.TargetProperty="Margin" From="1" To="10" Duration="0:0:0.1"/>
</Storyboard>
<DropShadowEffect x:Key="DropShadowEffect" BlurRadius="20" Opacity="1" ShadowDepth="0" Color="White"/>
</Window.Resources>
<Grid ShowGridLines="True">
<ComboBox Name="comboBoxTRIG" FontSize="40" Width="210" Height="98" HorizontalAlignment="Left" HorizontalContentAlignment="Center" Margin="40,-180,0,256" Background="Transparent" BorderBrush="Transparent" Foreground="White" BorderThickness="0">
<ComboBox Margin="25" Width="130" Height="50">
<ComboBox.Resources>
<SolidColorBrush x:Key="{x:Static SystemColors.HighlightBrushKey}" Color="Green"/>
</ComboBox.Resources>
</ComboBox>
</ComboBox>
</Grid>
</Window>