К сожалению, вы не можете использовать SystemColors.ControlTextBrushKey
, потому что он применяется, когда элемент не выбран, или когда он выбран, но не активен (ваш вопрос звучит так, как будто вас интересует только последнее). Тем не менее, вы можете сделать это:
<ListBox ...>
<ListBox.Resources>
<!-- this customizes the background color when the item is selected but inactive -->
<SolidColorBrush x:Key="{x:Static SystemColors.ControlBrushKey}">Red</SolidColorBrush>
</ListBox.Resources>
<ListBox.ItemContainerStyle>
<Style>
<Style.Triggers>
<!-- this customizes the foreground color when the item is selected but inactive -->
<Trigger Property="Selector.IsSelected" Value="True">
<Setter Property="TextElement.Foreground" Value="Blue"/>
</Trigger>
</Style.Triggers>
</Style>
</ListBox.ItemContainerStyle>
</ListBox>