views:

264

answers:

1

Hi, I would like to change the color of the popup background when using a DatagridComboboxColumn in the WPF Toolkit datagrid. I've edited the Template for a normal Combobox and it works great for selected item and other properties but the background stays white. I've used Snoop to do some research into the template and it claims that the DropdownBorder's background is set by the parent template but I can't figure out which template that is.

Any ideas?

+1  A: 

You have to change ItemContainerStyle, that contains style and template to control background/selected color etc. Because ItemContainerStyle of ListBox and ComboBox has IsSelected property that can be used for setting trigger for changing background color.

Akash Kava
That doesn't work if your background is transparent since the white background of the popup lies beneath it. I solved the issue by overriding the WindowsBrushKey which works in my application since I wanted the same color in textboxes and the like anyway. I'm still curious what part of the datagrid "bleeds through" to the combobox column though. When using a normal combobox my style works perfectly it is only within the datagrid that it fails.
Farawin