During a Silverlight project I finished up a while ago I needed to create a "simple" Color Picker ComboBox (or DropDownList for us ASP.NET Developers). By "simple" I mean limited to only a handful of colors, not as complex as something like Paint.NET (read PhotoShop) would provide. This is the easiest solution that I found.
The first thing you need to know is that the ComboBox has an ItemTemplate. This template allows you to completely control the look and feel of each entry in the ComboBox. From simple things like binding to a property to change the background color (hint hint, that is what we are about to do), to more complex things like changing the entire template based on the type of class being bound to this item in the ComboBox (ex: the ComboBox is bound to a list of "fruits" some are apples and some are bananas. The apples all use one template, the bananas use a completely different template - powerful).
We'll be binding this ComboBox to a list of strings. Each string we be the Hex representation of an eventual Color in the ComboBox. Here is the ViewModel that holds the List (and "SelectedColor" property that holds the currently selected color)
Then we'll need to create a new IValueConverter that will assist us in binding the strings to the ComboBox (and more specifically the Background Brush in the ItemTemplate). We can call the IValueConverter simply, StringToBrushConverter. IValueConverter is a fairly easy interface to implement, it only has two methods, Covert and ConvertBack. (As far as I can tell, the ColorConverter class is not in Silverlight yet, so the code is a bit messy for converting back and forth, but it'll do.)
Okay, so we've got our data, and the converter, so now we just need to wire it up. First we add the StringToBrushConverter as a Resource for the UserControl. Then we define the ComboBox's ItemTemplate. Now at first I thought I could use a simple Canvas in the ItemTemplate and set its Background to a SolidColorBrush that was the same color as the string, but for some reason in my project that was just not working. The Canvas was not aligning properly in the ComboBox. When I pulled the code out and put it into its own solution, it worked fine. I ended up Placing a Grid in the ItemTemplate and setting its background color, then placing a single TextBlock inside the grid and setting its Height and Width to size the grid.... try the Canvas first, but if that doesn't work for you I've included the "alternate solution".
Note the use of "Binding ." in the Binding statement of the Background property. That means Bind to the "entire" current DataContext itself and not a property of the current DataContext. (the ComboBox binds to the "Colors" collection, each Item binds to a individual string in the collection, so saying "Binding ." is saying bind to that string. A more common scenario might be to bind to a List of Employees, and bind each Item to the "Name" property. If you said "Binding ." in that case, you would be binding to a single Employee instance in the Employees collection)
And there it is, that's all there is to it. Hope you can find a use for this somewhere.