How to show group header for items in Silverlight combobox?
I have a combobox in Silverlight, whose itemssource is bound with a CollectionView
of CollectionViewSource
.
I have also added Gro开发者_运维百科upDescription
to the CollectionView
.
Now I need to display the items in ComboBox
grouped and also need to display the group header.
In WPF, there is ComboBox.GroupStyle
where I can define the group header. Whats the way to do it in Silverlight?
Thanks
The Silverlight combobox does not support grouping. Would it be sufficient to just sort the items before binding the combobox and then displaying both the group name and the item name in the combobox itemtemplate? The combobox items would then look something like this:
Category:Beer, Name: Anchor Steam
Category:Beer, Name: Budweiser
Category:Wine, Name: Opus 1
Category:Wine, Name: Sassicaia
精彩评论