F͓̽u͓̽c͓̽k͓̽i͓̽n͓̽R͓̽7͓̽a͓̽n͓̽
❔ ComboBox Color
comboBox1.Background = Brushes.Transparent;
comboBox1.BorderBrush = Brushes.Transparent;
// Change the color of the dropdown arrow
comboBox1.Foreground = Brushes.Purple;
// Change the color of the items in the dropdown list
comboBox1.IsEditable = false;
comboBox1.IsReadOnly = true;
comboBox1.ItemContainerStyle = new Style(typeof(ComboBoxItem))
{
Setters =
{
new Setter(ComboBoxItem.BackgroundProperty, Brushes.Purple),
new Setter(ComboBoxItem.ForegroundProperty, Brushes.White)
}
};
28 replies