Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
1385
Customize display of ComboEditorTool Items only in drop down
posted

I'm looking for a way to customize a ComboEditorTool, such that the selected item would appear normally in the combo box but the drop down items would include a short description of the item.  Attached is a picture of what I think it would look like.

In some ways it is closer to a gallery tool, and I am open to suggestions if it can be done with another control.

Parents
No Data
Reply
  • 34810
    Offline posted

    Hello Walter,

    The above can be achieved using the ComboEditorTool in the XamRibbon. To do this, I would recommend writing a ComboBoxStyle for your ComboEditorTool, and setting it to a Style that targets ComboBox. You might already be doing this, and targeting the ItemTemplate property of the underlying ComboBox, but this will have the template show up in the actual combo-box, rather than just in the drop-down.

    Instead of setting the ItemTemplate, I would recommend setting the ItemContainerStyle property of the ComboBox's style. This will accept a Style targeting the ComboBoxItem type. In this Style for ComboBoxItem, I would recommend setting the ContentTemplate property, as this will allow you to show a separate template in the drop-down to the one that is displayed in the ComboEditorTool.

    I have attached a sample project to demonstrate the above. I hope this helps you.

    Please let me know if you have any other questions or concerns on this matter.

    Sincerely,
    Andrew
    Associate Developer

    XamRibbonComboToolItemsCase.zip
Children