Quantcast
Channel: Windows Presentation Foundation (WPF) forum
Viewing all articles
Browse latest Browse all 18858

Change highlighted color of AutoComplete box

$
0
0

I am trying change highlight color in AutoComplete box and it is not working as well.  Here is my style;

<Style  x:Key="autoBoxStyle" TargetType="ListBoxItem"><Setter Property="Padding" Value="1"/><Setter Property="Background" Value="White" /><Setter Property="Foreground" Value="Black"/><Setter Property="HorizontalContentAlignment" Value="Left" /><Setter Property="VerticalContentAlignment" Value="Top" /><Setter Property="IsTabStop" Value="False" /><Setter Property="BorderThickness" Value="1" /><Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Auto"/><Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Auto"/><Setter Property="BorderBrush" Value="LightGray"/><Style.Resources><SolidColorBrush x:Key="{x:Static SystemColors.HighlightBrushKey}" Color="Green" /><SolidColorBrush x:Key="{x:Static SystemColors.ControlBrushKey}" Color="Yellow" /><SolidColorBrush x:Key="{x:Static SystemColors.HighlightTextBrushKey}" Color="Blue" /><SolidColorBrush x:Key="{x:Static SystemColors.ControlTextBrushKey}" Color="Red" /></Style.Resources></Style>

Everything else seem to work but the highlight.  Here is sample of what is happening;

What am I doing wrong?


Viewing all articles
Browse latest Browse all 18858

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>