Hey guys! Here is the deal...
I have a ComboBox defined in my window. The content of this comboBox, is only a string list with all values in Brushes class. Nothing special so far...
But what I'm trying to achieve is a way to change the combobox background color when the user changes the color. The color would be the value selected in the list.
I'm reading about triggers and setter, but I still don't know how can I do that.
(By the way, I already have a Converter that transform a string in a valid Brush.)
<ComboBox Name="cmbColor" >
<ComboBox.Triggers >
<Trigger Property="SelectedIndex" > // <- Pseudocode!
<Setter Property = "Foreground" Value="select_value_in_combo,Converter={StaticResource ColorConverter}"/>
</Trigger>
</ComboBox.Triggers>
</ComboBox>
Ideas?
Thanks!