Reputation: 205
i try in this way but its not working.
<DataGridComboBoxColumn.ElementStyle>
<Style>
<Setter Property="ComboBox.ItemsSource" Value="{Binding Path=ResourcesList}" />
<Setter Property="ComboBox.Foreground" Value="{Binding TypeOfEntry, Converter={StaticResource DisplayValueToBrushConverter}}"/>
<Setter Property="ComboBoxItem.Background" Value="SpringGreen"/>Value="Violet"/>
</Style>
Upvotes: 1
Views: 1062
Reputation: 152
If you want to set background color of ComboBox while editing DataGridComboBoxColumn, you can use this method
<DataGridComboBoxColumn>
<DataGridComboBoxColumn.EditingElementStyle>
<Style TargetType="ComboBox">
<Setter Property="Background" Value="White"></Setter>
</Style>
</DataGridComboBoxColumn.EditingElementStyle>
</DataGridComboBoxColumn>
I tried this and it is working fine.
Upvotes: 1