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
1590
Data templating in ComboEditorTool when using themes
posted

Hi, I'm having problems applying data templates to combobox items in a ribbon (ComboEditorTool controls). I have added a sample that illustrates the problem. If you start the sample, you will see that, when opening the combobox, all items are templated correctly. You can use the buttons to switch Theme. If you set the theme to either IGTheme or Office2010Blue theme, the combobox items are still rendered correctly. But when you set to Office 2013 or one of the Metro themes, suddenly the items are simply rendered as a ToString. This used to work, so I suspect it might have gone wrong since one of the patches. Could you check this out please?

Regards, Stefan

TestRibbonComboBox.zip
Parents
  • 34510
    Verified Answer
    Offline posted

    Hi Stefan,

    Thanks to your sample I was able to reproduce the behavior that you explained.  It's quite odd how certain themes produce this issue while others don't.  I have asked our engineering staff to examine this further.  To ensure that it will receive attention, I have logged this behavior in our internal tracking system with a Development ID of 194702.  The next step will be for a developer to review my investigation and confirm my findings or to offer a fix, or other resolution.

    In order to better track this, I have created a private support case for you.  The case number is CAS-156317-Q8K2B9 and you can view it here.  The development issue has been linked to this support case.

    As a workaround it should be possible to force your style to be used by setting the ComboEditorTool.ComboBox.Style directly after changing the ApplicationTheme.  You might need to do this inside a Dispatcher.BeginInvoke() since after changing the ApplicationTheme the ComboBox may not exist right away.  A Dispatcher.BeginInvoke with a DispatcherPriority set to "Render" should do the trick.

Reply Children
No Data