ComboBox, ListBox Column Headers
-
Good People, Is there a way to have column headers in a listbox or combobox? Any information or help you can provide would be great. Thanks, BP
-
Good People, Is there a way to have column headers in a listbox or combobox? Any information or help you can provide would be great. Thanks, BP
For listbox, I would instead use a ListView with a GridView as its view. For ComboBox - I haven't tried it, but if you look at an example of a ComboBox template (ripped with Blend or the ComboBox ControlTemplate Example[^]) you can look for the panel with IsItemsHost="True". For example if it's a ScrollViewer/StackPanel like at the link above, you could replace those with a ListView/GridView. I'm not sure how the PART_EditableTextBox element of the comboBox gets its text, but maybe simply overriding ToString() on your ItemsSource data class will do the trick. Mark
Mark Salsbery Microsoft MVP - Visual C++ :java: