New SytemColors Introduced with .NET 4.0
This is similar to the .NET 4.0 method. According to the comment, this changed in 4.5 - not 4.0.
<ListBox.ItemContainerStyle>
<Style>
<Style.Resources>
<SolidColorBrush x:Key="{x:Static SystemColors.HighlightTextBrushKey}" Color="Red"/>
<SolidColorBrush x:Key="{x:Static SystemColors.InactiveSelectionHighlightTextBrushKey}" Color="Green"/>
<SolidColorBrush x:Key="{x:Static SystemColors.HighlightBrushKey}" Color="Pink"/>
<SolidColorBrush x:Key="{x:Static SystemColors.InactiveSelectionHighlightBrushKey}" Color="Yellow" />
</Style.Resources>
</Style>
</ListBox.ItemContainerStyle>
At first I, although the definition of ControlBrushKey changed, but it was not. It seems that the behavior of ControlBrushKey changed in this situation
Notice Behavioral Changes Using GridView
source
share