Reputation: 117
I am having trouble with the ComboBox's selected item color... By default, when you select an item from the ComboBox, it's Black. How do I change the color of the item to White? I cannot seem to modify it. What's the deal?
Upvotes: 1
Views: 2459
Reputation: 37800
In the simplest case you can write this in XAML:
<ComboBox ItemsSource="{Binding DropDowmItems}" Foreground="Red">
<ComboBox.ItemContainerStyle>
<Style TargetType="{x:Type ComboBoxItem}">
<Setter Property="Foreground" Value="Black"/>
</Style>
</ComboBox.ItemContainerStyle>
</ComboBox>
In the case of item template, you need to modify that template.
Upvotes: 4