tags:

views:

40

answers:

2

I need to place a ComboBox in a place where I have very limited space. Is there any way to show content for the selected item in the ComboBox that is different than the content that is displayed for the item in the ComboBox's Popup?

As an example, Firefox does this with it's Site Search box in the top right of the browser. When you open the dropdown, the site names are displayed along with their respective logos, but when a site is selected, only the icon is displayed.

A: 

Yes, have 2 sets of data and change the display member column of the combobox - according to the position. as long as the value is the same, it will work good, and you'll get 2 displays out of the same combo-box.

Dani
Yeah, I had tried that already. Problem is that when you change the member path, the text also changes in the ComboBox's popup.
Tal Even-Tov
+1  A: 

UPDATE: Solution found :-)

I found a solution at this site:

http://blogs.windowsclient.net/airborneengineer/archive/2009/06/25/wpf-styles-and-templates-part-ii-combobox-customization.aspx

I just needed to modify the "DisplayImageWithText" DataTemplate to only show the field I want.

Tal Even-Tov