Hi,
I'm having a problem re-templating combo box items on the RadRibbonComboBox. The item template works fine only for items in the drop down, but not for the selected item that shows when the como is closed. I bind the ItemsSource to a collection of custom entities, and was setting the DisplayMemberPath to one of their properties - MemberDisplay - but I now need to do extra formatting on the display so as to change the background colour of certain items based on values in the entity.
As i said, it works for the items in the dropdown, but not for the selection box items. Here is the xaml:
That seems right to me, and when i use this kind of concept for other combos it works ok. Is this something particular to RibbonComboBox controls? I've attached images of how it looks in the application.
I'm having a problem re-templating combo box items on the RadRibbonComboBox. The item template works fine only for items in the drop down, but not for the selected item that shows when the como is closed. I bind the ItemsSource to a collection of custom entities, and was setting the DisplayMemberPath to one of their properties - MemberDisplay - but I now need to do extra formatting on the display so as to change the background colour of certain items based on values in the entity.
As i said, it works for the items in the dropdown, but not for the selection box items. Here is the xaml:
<
rad:RadRibbonComboBox
Width
=
"95"
Margin
=
"0 5 0 0"
IsEditable
=
"True"
IsReadOnly
=
"True"
ItemsSource
=
"{Binding TimeFilterFromMonitorCombo.Items}"
SelectedItem
=
"{Binding TimeFilterFromMonitorCombo.SelectedItem}"
IsSynchronizedWithCurrentItem
=
"True"
>
<
rad:RadRibbonComboBox.ItemsPanel
>
<
ItemsPanelTemplate
>
<
VirtualizingStackPanel
/>
</
ItemsPanelTemplate
>
</
rad:RadRibbonComboBox.ItemsPanel
>
<
rad:RadRibbonComboBox.ItemTemplate
>
<
DataTemplate
>
<
StackPanel
Orientation
=
"Horizontal"
>
<
TextBlock
Background
=
"{Binding ItemBackground}"
Text
=
"{Binding MemberDisplay}"
HorizontalAlignment
=
"Stretch"
/>
</
StackPanel
>
</
DataTemplate
>
</
rad:RadRibbonComboBox.ItemTemplate
>
</
rad:RadRibbonComboBox
>
That seems right to me, and when i use this kind of concept for other combos it works ok. Is this something particular to RibbonComboBox controls? I've attached images of how it looks in the application.